Hello Everyone! I have made one registration system that can send an email with registered data to the administrator and to the user. now my problem is that how can i know the ID number of the new user registred 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" any one can please help me to solve this problem Thanks in advance.
From what I get from your question ( sorry, but you could have stated it a bit clearer ) you might need to fetch the last inserted id right after the insertation of a new user data, check this out : PHP: mysql_insert_id - Manual
hello with what i understand you just want to get data from your database right? make like this first make a connection to your db . i like to put it in function <?php function db_connect() { $db = new mysqli('localhost','username','password','database name'); if(!$db) { echo "cannot connect to database right now"; } else { return $db; } } ?> then call the db like this <?php $con = db_connect(); //connect to your database $query = "select * from form1 where id= '$id'"; // make a query $get_query = $con->query($query); // search the query where($row = $get_query->fetch_assoc()) { $data = $row['id']; // id is your column table that you want to fetch echo $data; // get output data } ?> i hope this its help. sorry if my english is not good