I have 2 pages, on the first page, data is collected through a formwhich goes to a database and the user is automatically forwarded to the second page. The table uses a auto increment id field. I need to now the ID of the inserted record on the second page.
I know the function is mysql_insert_id(), but when I try and implement it, it only returns 0.
Does this code have to be on the first page or the second? If it is included as part of the select statement on the first page (as I have seen done) how do I then pass the ID to the second page?