I am trying to create a variable with one id of the last insert that I do and I am trying to past it to another page.
In the first page this is code:
$insert= "INSERT INTO resources (name,description,place,time) VALUES ('$name','$description','$place',CURDATE())";
mysql_query($insert);
$last_id= mysql_insert_id();
header("Location:new_page.php?last_id=$last_id");
And in the second page this is my code:
<?php
echo "This is id of resource : $last_id";
?>
I can't do to work it, any solution?
Thanks!
Regards