redirect info
Posted: Mon Oct 10, 2005 8:32 am
is there a function or a way to find out the page that opened the curent page.I mean if code.php sends you to search.php,in search.php how can I find out that code.php send me here?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
session_start();
$_SESSION['REFERER'] = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
header('Location: receiver.php');
?>Code: Select all
<?php
session_start();
if ($_SESSION['REFERER'] == 'http://www.yourdomain.com/sending.php') {
//woo!
} else {
//boo!
}
?>