RE: [PHP] Redirection and URL in Browser...

From: Date: Wed, 02 Aug 2000 20:35:53 +0000
Subject: RE: [PHP] Redirection and URL in Browser...
Groups: php.general 
Request: Send a blank email to php-general+get-9824@lists.php.net to get a copy of this message
Just do another redirect after the product is added: (in add.php) add_product(); // or whatever code you use to add the product to the sess var, db, whatever // instead of displaying output here, redirect to another page (perhaps the shopping cart contents?) header("Location: http://your.server/productadded.php"); --Bruce Bruce Christensen Intel Corporation brucex.r.christensen@intel.com -----Original Message----- From: Martin Thoma [mailto:martin@radiok2r.de] Sent: Wednesday, August 02, 2000 1:17 PM To: php-general@lists.php.net Subject: [PHP] Redirection and URL in Browser... Hello ! I'm adding products to my shopping-cart with a php-script like add.php?product. IMPORTANT: It's NOT possible to use SUBMIT or any Java-Script-Stuff. And I don't want to use META-Redirection, becaus it shows up in (Netscaps) Browser-History, which makes it impossible for the user to use the "Back"-Button. The problem: When the user presses "reload" on the browser, the product is added again, because the script add.php?product is called again. Any idea how to handle this ? I tried to do the following: When pressing "buy" on a produkt, the script add.php?product is called, but it's making no output, instead I use Header("Location: show.php") to redirect to shop.php, which shows the cart. The problem: This works, but in the adress-bar, the browser still shows add.php?product. If the user presses "Reload", the product is added again... Any ideas ? Regards Martin -- 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 (#9824) next »