Trying to be short.
I have page A with a form that when is filled in submits to page B on wich a booking is done in mysql database and the user is redirected to an external paypal page.
Problem, if backbutton is hitten after the booking is done to edit what was written in form, as booking is already done by the script a new booking cant be done.
So therefore I want to use sessions to delete the booking if backbutton is hit.
I tried to add the delete script in page B using sessions, but it did not work as page is not refreshed, only stepped back, so then I am trying to do on page A.
So I need to on page A if the person comes to page A from a previous page with a form (not page B) then start session and fill in form.
However if there already is a session with a booking id for the session I need the id to be deleted in the database, then destroy the session and start a new session.
So I need something like this wich gives me error and its the same, page A is hit by backbutton so does not refresh:
$sql = mysql_query("DELETE FROM bookings WHERE id=$ids");
maybe the session should expire if backbutton is hitten and if expires the booking deleted? Sorry but no experience with sessions.