I am inserting some data into a mysql table which has an auto_increment id column.
Is there a way to get the number from that column so I can use it in the same script?
i.e. the INSERT function is run and then I can assign the auto_increment number to a variable?
// Insert data
$sql = mysql_query("INSERT INTO table SET name='$name'");
// do something to get the auto_increment number that was created in table for the INSERT
$name_id = // <- assign it to a variable