I wonder what would the best way to make the user go back to the previous page after submitting or updating a form.
e.g From the profile.php
page with the original id, the user then clicks on the update button which will submit the data and lead to updateprofile.php
with the same id. After submitting the new data, the database will update based on the new given id.
Once the update is submitted, I want the user to be sent back to profile.php
with the same id.
After inserting/updating data,get the last inserted id in updateprofile.php and return back to profile.php. Check this link for more info. mysql_insert_id