Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Read primary key while entering a new row

Status
Not open for further replies.

bjl6d

Programmer
Jul 28, 2006
5
US
I am not sure how to do this and would appreciate any advice you all have to give.

I have a website with a form on it. Upon pressing submit, the information gets entered into the database on a new row. Each row is numbered with auto_increment (it's the Primary key). The auto_incremented field is called the ID.

When the user submits his information, I would like an automatic email to get sent to his email with his unique ID number and a recap of this information. How can I do this?

Basically it seems to me that all I need to know is the command to be able to read information off of the row that you're currently putting information on. The only way I can think of to do this is to have the form input all the information, then close that connection and start a new one in which it searches for the row that contains all that information and that way I can get it to read the ID then. Is there a shorter way? Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top