need help in php variable

Posted on 16th Feb 2014 by admin

i have a php variable on one page
Code: [Select]$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
Code: [Select]$lastId = $_POST["lastId"];
this displays this error

Code: [Select]Notice: Undefined index: lastId in D:wampwwwdynamicquiz2action.php on line 30
how can this be solved

Other forums