You are here: Re: Problem with HTTP_REFERER when clicking on refresh button « PHP Programming Language « IT news, forums, messages
Re: Problem with HTTP_REFERER when clicking on refresh button

Posted by purcaholic on 05/13/07 14:55

Hi Martien,

a header redirect is a simple way to prevent reloading a page several
times. Store your article in "winkelwagen.php" and make a redirect to
another page.
Example:
[snip]
if(!isset($_SESSION['artikelen'])) //initiate the array when the
first
article is added to the shopping cart
{
$_SESSION['artikelen'] = array();
}

$waarvandaan = $_SERVER['HTTP_REFERER'];
if (strstr($waarvandaan, "meerinfo.php"))
{
$id = $_GET['id'];
$_SESSION['artikelen'][] = $id;
}

header("Location: ./meerinfo.php");
exit;
[/snap]

The redirectiom should done before any output is send to client.

purcaholic

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация