Skip to main content
Participant
May 21, 2007
Question

Input record and view details

  • May 21, 2007
  • 1 reply
  • 184 views
I'm using a form to register users and immediately after the registration I want to go to a detail page that shows the users details. How do I create a query to do this in php?

Kind regards,

Robin Meeuwsen
This topic has been closed for replies.

1 reply

Günter_Schenk
Inspiring
May 21, 2007
Hi,

you can retrieve the new record this way:

SELECT * FROM user_table ORDER BY id DESC LIMIT 1

- "id" is your unique numeric autoincrement field
- DESC means "in descending order"
- LIMIT 1 means "retrieve just one record"