RE: [PHP] credit card issue

From: Date: Mon, 04 Dec 2000 13:25:31 +0000
Subject: RE: [PHP] credit card issue
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28567@lists.php.net to get a copy of this message
Good question as to why it did not work. Check the following: Echo the following: $dateheader date("D, d M Y H:i:s",$dateHeader)." not GMT") gmdate("D, d M Y H:i:s",$dateHeader)." GMT") so you can take a look at what these are generating. Then check to ensure that the server is spitting out the correct GMT date and not some date in the future. must be gmdate that you send to the cache not local date. Try setting the modified and expire date to time()-86460 #24 hours and 60 seconds ago I usually try to not go overboard with expirey and mod dates (ie modified in 1945) in case future permutations of cache engines ignore this "missuse" of cache control fetures. You may need to clear your local cache, and perhaps even wait your your upstream provider to clear their cache if you had no cache control on the document before. This is highly unlikely though. The last solution would be to check your apache(or other web server) configuration files and check what header information is being sent, perhaps the server is sending conflicting information from the header information you are providing. Aside from that, don't know where you point you... the code takes care of new and older browsers as well as a variety of cache controls. A javascript solution has been provided, the only downside may be compatiblity with older/custom(AOL) browsers... you have to check for that. Dave -----Original Message----- From: Jacky [mailto:jacky@activelifestyle.com] Sent: Monday, December 04, 2000 12:20 PM To: Dave VanAuken; php-general@lists.php.net Subject: Re: [PHP] credit card issue Dear Dave, I did use the include function on top of the form page like this: <? include("includes.php3"); ?> <HTML><HEAD><TITLE>Request Form</TITLE> </HEAD> . . . And I change this line below from $expHeader=$dateHeader-60; // set expire date for 60 seconds ago to be $expHeader=$dateHeader-5; // set expire date for 5 seconds ago After I submit the form and click back button at the browser ( IE 5.0), it still did not work, although I waited for at least 20 secs before I clicked back. Any thing I did wrong? Jack jacky@activelifestyle.com "Power is nothing without control ----- Original Message ----- From: Dave VanAuken <dave@hawk-systems.com> To: Jacky <jacky@activelifestyle.com>; <php-general@lists.php.net> Sent: Sunday, December 03, 2000 9:32 PM Subject: RE: [PHP] credit card issue > Kill the page by expiring it. > > You may place the following in the file itself. I use it as a pluggable > function call to a lib file which is included for every application. > > > # your original file that you want to expire - **at the top** > include("includes.php"); #can use require as well > cacheDisabler(); > # no lines of display should appear before this line > # since you are sending header info... else you will > # get header already sent error */ > > > # file includes.php contains the following finction > > function cacheDisabler() { > # Begin Header for killing cache and back button reload problem > $dateHeader=time(); > $expHeader=$dateHeader-60; // set expire date for 60 seconds ago > $modHeader=$dateHeader-3600; // set modified date for an hour ago > header("Date: " . gmdate("D, d M Y H:i:s",$dateHeader)." GMT"); > // Current > Date > header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 > header("Expires: " . gmdate("D, d M Y H:i:s",$expHeader)." GMT"); > // Date in > the past > header("Last-Modified: " . gmdate("D, d M Y H:i:s",$modHeader)." > GMT"); // > always modified > header("Pragma: no-cache"); // HTTP/1.0 > # End header > } > > > If you are using this method and allow error checking on your form (for > missing variables and such) you may want to have those variables echo'd back > (except for credit card info) into a new form for correction/entry otherwise > you are forcing the individual to reload and refill out the entire form > again. > > If that doesn't make sense, let me know. > > Dave > > > > -----Original Message----- > From: Jacky [mailto:jacky@activelifestyle.com] > Sent: Monday, December 04, 2000 10:26 AM > To: php-general@lists.php.net > Subject: [PHP] credit card issue > > > Hi all, > I did write a form in php for customer to purchase things and it contains > credit card number. I tested it and realise that after I submit the form, > and redirect the page to another page, If I click the "back" button of the > browser ( using IE 5.0 ) to come back to the form, I found that the credit > card detail was still there. > The credit card page is on secure server by the way. > Is there anyway I can solve this problem? > Any help will be greatly appreciated. > > Jack > jacky@activelifestyle.com > "Power is nothing without control > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#28567) next »