Re: Check multiple cookies
| From: | Plutarck | Date: | Mon, 21 May 2001 14:31:31 +0000 |
| Subject: | Re: Check multiple cookies | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53726@lists.php.net to get a copy of this message | ||
header("Location: http://www.example.com");
That redirects the user to the wepage of you're choosing. The rest is just a
matter of checking variables. For instance, you can do this:
if ($var1)
{
$url = 'www.example1.com';
}
elseif ($var2)
{
$url = 'www.example2.com';
}
elseif ($var3)
{
$url = 'www.example3.com';
header("Location: $url");
Obviously there are endless ways to do it, but that's the basic idea.
Plutarck
"Sam Gooding" <samgoody@mailandnews.com> wrote in message
news:5.0.2.1.0.20010521090526.00a4b2f0@mailandnews.com...
> Is it possible to check multiple cookie values and then redirect to
another
> page depending on what cookie values have been set? Sort of like:
>
> if(cookie == 3)
> goto(url1)
> elseif(cookie2 = 5)
> goto(url2)
> else
> goto(url3)
>
> Thanks in advance!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>