I need help please again

Discussion in 'MySQL' started by Rivmedia, Oct 24, 2009.

  1. #1
    I have a friend who made a registration system that can send an email with the registered data to the administrator and to the user,

    His question is:

    How can I read the ID number of the new user registered in my database, that have auto increase function, and display it in the email that the system will send?

    $checkid = mysql_query("SELECT id FROM form1 WHERE id='$id'");

    $message2 = "Your ID: $id"


    ?

    thanks in advance
     
    Rivmedia, Oct 24, 2009 IP
  2. kind_of_the_cash

    kind_of_the_cash Active Member

    Messages:
    852
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    85
    #2
    kind_of_the_cash, Oct 24, 2009 IP
  3. ThomasTwen

    ThomasTwen Peon

    Messages:
    113
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    $checkid = mysql_query("SELECT id FROM form1 WHERE id='$id'");
    $id = mysql_insert_id();
    $message2 = "Your ID: $id"
    PHP:
    It's as easy as that.
     
    ThomasTwen, Oct 25, 2009 IP