0

I need some help here I am trying to figure out to set a php file to go to different URLS based on the request it receives.

eg this code might make no sense at all

I want to code for 6 different referrers.


<?php
if (($_GET) != '097641342sjherjy')
{header.location 'URL'

}

?>


Can someone help me PLEEEEAAAASSEEEEE.

3
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by jtmcgee
0

I know how to find the variables that is not the question

What I NEED is this

a way to code


<?php

if(($_GET["PID"]) == "piddetails")
{

header("Location: http://www.pagename");

}
?>

and to be able to evaluate and redirect for six other values for PID
That is what I am trying to find out.

0

ok I got it I defined the variable first from the $get then evaluated the if for the variable

thanks

0

<?

switch ( $_GET )

case '3495843509843503':
header("Location: http://www.pagename");
break;
case '640968450':
header("Location: http://www.pagename");
break;
default:
echo"We could not redirect you sorry";
break;

?>

That should be good, you'll have to add more cases and stuff though.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.