I have a form with an auto_inc field. The form on submit creates in the table the tuple - with the auto_inc field. What I then need to do is pull the auto_inc field back into the form for processing as a variable to both be displayed in the form, and additionally saved to another table, all in the one form.
Xayan..U do not need to have Auto increment field in PHP, rather u have a field with AUTO-Increment Type in DB table. Follow the steps below
1. In ur DB table have a field with attributes - "`serial` mediumint(10) unsigned NOT NULL AUTO_INCREMENT,"
2. Once the Insert is done and $dbc is ur db connection variable, use $serial = mysqli_insert_id($dbc);
3. then u can use this $serial.
Please let me know if it answers ur query