![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jan 2003
Location: ICQ: 17630227
Posts: 2,988
|
Help me, I want to set up a PHP redirect file, Thanks
Hi I have a problem,
I want a simple PHP file that only does redirect, I have something made up but doesn't work: <?php switch($id) { case 0: $url = "http://www.yahoo.com"; break; case 1: $url = "http://www.altavista.com"; break; } header("Location: $url"); ?> I named it redirect.php and if I make query http://www.mysite.com/redirect.php?id=0 it takes me to yahoo.com but if I make query http://www.mysite.com/redirect.php?id=1 it takes me to yahoo.com again instead of altavista.com help? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jul 2002
Location: some where in a basement
Posts: 609
|
try this
switch($HTTP_GET_VARS["id"]){ case 0: $url = "http://www.yahoo.com"; break; case 1: $url = "http://www.altavista.com"; break; } header("Location: $url"); ?>
__________________
____________ Marc |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Join Date: Feb 2002
Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: isN'T everything
Posts: 5,394
|
Quote:
__________________
SIG TOO SMALL! Maximum 1200x600 button and no more than 30 text lines of ALL SIZES and COLORS. Unless your sig is for a GFY top banner sponsor, then you may use a 6240x4800 instead of a 1024x800. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2003
Location: ICQ: 17630227
Posts: 2,988
|
Many thanks dacash !!! Works fine now!
Thanks again 10x ! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Jul 2002
Location: some where in a basement
Posts: 609
|
no problem, always try to help people out, because someday maybe i'll need some help
![]()
__________________
____________ Marc |
![]() |
![]() ![]() ![]() ![]() ![]() |