Page 1 of 1

Help redirecting URL based on user's input...

Posted: Mon Feb 10, 2014 7:21 pm
by surreylee
I am trying to re-direct users to specific URLs depending on their input from another page. Code listed below:

<?php
$user1=999;
$user2=100;
$user3=200;

$account=$_POST["account"];

if ($account==$user1)
{
header ('Location: /support.html');
exit;
}
elseif ($account==$user2)
{

header('Location: /services.html');
exit;
}
elseif ($account==$user3)
{
header('Location: /about.html');
exit;
}
else
{
echo "this don't work";
}
?>

I have also tried ('Location: http://mydomain.com/about.html'); and to no avail.

Re: Help redirecting URL based on user's input...

Posted: Mon Feb 10, 2014 7:39 pm
by Celauran
And? What happens?

Re: Help redirecting URL based on user's input...

Posted: Mon Feb 10, 2014 10:09 pm
by surreylee
It just goes to a blank page