I have a friend who made a registration system that can send an email with the registered data to the administrator and to the user, His question is: How can I read the ID number of the new user registered in my database, that have auto increase function, and display it in the email that the system will send? $checkid = mysql_query("SELECT id FROM form1 WHERE id='$id'"); $message2 = "Your ID: $id" ? thanks in advance
You needs to get last inserted report if so try this one http://www.vision.to/get-last-inserted-record-id-phpmysql.php If you ask that you want to take current registered user you have to use sessions
$checkid = mysql_query("SELECT id FROM form1 WHERE id='$id'"); $id = mysql_insert_id(); $message2 = "Your ID: $id" PHP: It's as easy as that.