$dml = "insert into table ...";
mysql_query($dml,$con);
The above insert something into a table.then you can check if it succeeded by either
if('' == mysql_error($con))...
or
if($id = mysql_insert_id($con))...
What's your choice and reason?
BTW,will the below still have $id fetched when running both of them,I've not tried yet:
$err = mysql_error($con);
$id = mysql_insert_id($con);