0

The question is in bold. Everything else is for context.

  1. User submits form data, which is inserted into a MySQL db. The MySQL db generates an auto-incremented "id".

  2. "id" is then (auto) pulled out of the db and is emailed to User via a "Success" email.

Possible? How? Thanks, Leo Jerome

  • Yes. What language is this for? – Dirk Jun 27 '11 at 16:56
  • Did you try something? I think that's a very straight question and you can find many articles on the web explaining how to read the last inserted ID from the DB – Abhay Jun 27 '11 at 17:42

3 Answers3

0

Its definatly possible. Depends what language your most familiar with but here is one way

Community
  • 1
  • 1
Tom Squires
  • 8,848
  • 12
  • 46
  • 72
0

Assuming you're using php, use mysql_insert_id() to get the id of the last inserted record. It returns an int.

kinakuta
  • 9,029
  • 1
  • 39
  • 48
0

In PHP you are able to receive the last id inserted by using mysql_insert_id() (see here) and further mail()

Jaques le Fraque
  • 523
  • 1
  • 5
  • 12