Hi all,
Could you please explain what the below do?
Thanks.
$student_id = mysql_result($find_student, 0); $student_id = mysql_insert_id();
$student_id = mysql_result($find_student, 0);
returns the 1st line of the query $find_student
$student_id = mysql_insert_id();
makes $student_id the last ID generated for an AUTO_INCREMENT column by the previous INSERT query
RTFM [man]mysql_result[/man] Retrieves the contents of one cell from a MySQL result set.
[man]mysql_insert_id[/man] Get the ID generated from the previous INSERT operation
Is your manual broken?