doforumda Posted October 16, 2009 Share Posted October 16, 2009 i have a php variable on one page $lastId = mysql_insert_id($db); echo $lastId; i want to send this variable and the value in it to second page when i click on submit button i already tried this but it is not working $lastId = $_POST["lastId"]; this displays this error Notice: Undefined index: lastId in D:\wamp\www\dynamic\quiz2action.php on line 30 how can this be solved Quote Link to comment Share on other sites More sharing options...
isedeasy Posted October 16, 2009 Share Posted October 16, 2009 You could add a hidden field in your form like this... <input type="hidden" name="lastId" value="<?php echo $lastId ?>"/> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.