I wouldn't rely on HTTP_REFERER at all.. some user agents don't set it.
For things that need to revert back to a certain URL after a few tasks have
been performed (eg login, email page to a friend, add to cart, add to
wishlist, etc etc).
To do this, I use PHP_SELF ($_SERVER['PHP_SELF'] in PHP =
I'd put a conditional include on the top of the present script.
if ( !empty($_POST['addtocart']) ) {
include('./the.update.script.php');
}
Then redisplay the existing page with the new information.
--Dan
--
PHP classes that make web design easier
SQL
2 matches
Mail list logo