Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
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.
"You have Successfully registered with us n your id is xxxxxx"
Please someone helpme out with this
- New php-forum User
- Posts: 3
- Joined: Wed Feb 20, 2013 1:52 pm
It depends on how you've decided to interact with your database. If you're using PDO, then the id would be stored in PDO::lastInsertId, with mysqli, if you're using objects it would be in mysqli::insert_id procedural it would be returned with a call to mysqli_insert_id()
- php-forum Fan User
- Posts: 838
- Joined: Mon Oct 01, 2012 12:32 pm
Return to PHP coding => General
Who is online
Users browsing this forum: Yahoo [Bot] and 1 guest