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