I have a web form that is inserting data into a mySQL table. The last field in this table is an auto-numbered id field. I would like to automatically return this id number so that the users can then view their data on another page. Is there a way to do this so that someone with my little experience can do this?
The code that I have for my query is:
$result = mysql_query($query);
if ($result)
{echo mysql_affected_rows(). " record inserted into database. Record number".[idnumber];}
else
{echo "it didn't work.";}
Everything works except for the ".[idnumber]" on the end. What I am trying to do is pull out that auto-numbered field for the just entered record.
Thanks.