I am inserting a record and i want to use the id of the last record inserted. This is what i have tried:
$sql = \'INSERT INTO customer (first_name,
Check out mysql_insert_id()
mysql_query($sql); $id = mysql_insert_id();
When that function is run after you've executed your INSERT statement in a mysql_query() command its result will be the ID of the row that was just created.