cipher143 Posted February 20, 2013 Share Posted February 20, 2013 i have created a registration form page with id,name,col,branch,etc Coming to the database ID is primary and auto increment, im trying to print the generated value of from the database after the registration is done. For example: "You have Successfully registered with us n your id is xxxxxx" Please someone helpme out with this Link to comment https://forums.phpfreaks.com/topic/274745-php-print-from-database-after-registartion/ Share on other sites More sharing options...
mweldan Posted February 20, 2013 Share Posted February 20, 2013 after writing the data into database you can use any of these functions to get last inserted id. //mysql extension mysql_insert_id(); //mysqli extension mysqli_insert_id(); //pdo PDO::lastInsertId(); //ref //http://php.net/manual/en/function.mysql-insert-id.php Link to comment https://forums.phpfreaks.com/topic/274745-php-print-from-database-after-registartion/#findComment-1413725 Share on other sites More sharing options...
AyKay47 Posted February 20, 2013 Share Posted February 20, 2013 What code have you wrote so far? Please post it here. Link to comment https://forums.phpfreaks.com/topic/274745-php-print-from-database-after-registartion/#findComment-1413728 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.