Jump to content

Archived

This topic is now archived and is closed to further replies.

aeafisme23

$referrer

Recommended Posts

Description:

Im at yahoo.com, i type in mydomain.com in address bar. i want the user to be redirected to their last current page they were on (yahoo.com).

Im doing this so they have to go through my site to that certain page rather than type the exact url into addressbar.

Here is what i got so far:

[code]
/* Error Checking, if state or city does not exist, then go back to Original URL ... so if you came from Yahoo, go back to Yahoo */
if ($state == "" || $city =="") {
$URL=$referrer;
header ("Location: $URL");
}

/* Error Checking, if here then just do that simple echo more programming would be inserted with includes and what not
/* RICHMOND, VIRGINIA: WTVR AND MATTRESS WAREHOUSE*/
elseif ($state == "VA" && $city =="Richmond-Petersburg"){

echo "hi ur from Virginia, Richmond area";}

/* Error Checking, this is an else just because who knows what might happen , but hey lets send them back to Yahoo if thats where they came from
else {
$URL=$referrer;
header ("Location: $URL");
}
?> [/code]

Everything works except for the fact that it redirects back to the [a href=\"http://www.domain.org/\" target=\"_blank\"]http://www.domain.org/[/a]video/INDEX.PHP not back to say AMAZON or ebay wherever a person is entering the link from. Any ideas? Thanks guys

Share this post


Link to post
Share on other sites
Simplified Version:

Im at yahoo.com, i type in mydomain.com in address bar. i want the user to be redirected to their last current page they were on (yahoo.com).

Im doing this so they have to go through my site to that certain page rather than type the exact url into addressbar.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.