Hey all. Let me explain what I'm doing. I have sessions working, along with a form that is interactive with the user, they post things into it, enter part numbers, and it does calculations and displays. I have an order manager which displays order links. The links pass along a variable (i.e. www.myserver.com?firstTime=YES&Order=13) and that is used to connect to a MYSQL database to open the form for editing basically.
What I need:
I need the form to know if the user has just opened a link, or if they are interacting with it, and have been on it. Granted, the form works fine right now, as I use $GET['FirstTime'] in an if:
if ($GET['firstTime']='YES' && !isset($SESSION['second'])) {
$firstTimeCheck = $GET['firstTime'];
$SESSION['orderReference'] = $GET['order'];
$_SESSION['second'] = 'false';
}
but say someone clicks an order by mistake and hits "Back" on their browser, then clicks a different order, it doesn't connect to the MYSQL database. This is because later in the script I set the Session['second'] and it still keeps it set I guess. I even tried destroying the session and setting session equal to a blank array on the page they are going back to (order master) but to no avail.
Any clue what I could do 🙁