Re: page expired

From: Date: Wed, 26 Dec 2001 16:45:40 +0000
Subject: Re: page expired
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78782@lists.php.net to get a copy of this message
This has nothing to do with mysql or sessions. Your form is sent using the POST method. For security reasons, browsers (by default) will not resend POST information to a page when you hit the back button. Fred Php Guy <php_guy@visors.com.hk> wrote in message news:Pine.LNX.4.21.0112261854560.23442-100000@visors.com.hk... > Hi, > > I have problem in that my webpage in which I use sessions and MySql gives > a "warning paged expired" error when the user presses "back" button on the > browser. Basically, the function of the webpages will be to store user > enquiries in the Mysql database until the user presses a "send email > enquiry" button in which afterwards the accumulated enquiries (recognized > by the sessionid) of the session will be sent to the relevant person. The > pages are modularized. All of the pages start off by "including" a > "sessions.php" which has the following: > > session_start(); > $connection = mysql_connect("localhost", "root", "password") or > die > ("Couldn't connection to database"); > $db = mysql_select_db("micromotor", $connection) or die > ("Couldn't select database."); > ?> > > > The pages also "include" a form.php file which has the following to enter > data into the Mysql database. A few lines from this file are as follows: > > else > { > $insert_sql = "INSERT INTO test VALUES('$sessionid', '$modelno', > '$qty', > '$purpose', '$comments', $date')"; > mysql_query($insert_sql) or die ("could not insert records"); > > > After I enter information into the form , I find that if I want to use the > "back" button on the browser, the browser displays a "warning page > expired". Then I have to press "back" one more time before I can get to > the page that I want. > > I was wondering am I registering my sessions id the wrong way? > > Thanks. > > Peter > >

« previous php.general (#78782) next »