I'm submitting a form to a search page that performs different searches
based on what engine was selected. One of these searches is restricted, and
runs a function that checks for a cookie. If the user has no cookie, they
are redirected to a login page.
I've used echo tests to make sure the function is being run correctly, that
I don't have a cookie, etc, and it all checks out. I *SHOULD* be redirected
to a login page, but I am not.
if ($fromwhere == "ARCHIVES") {
check_cookie($cookiename);
Header("Location: gotosearch);
}
switch ($fromwhere) {
case "SITE":
Header("Location: gotosearch2);
break;
case "ARCHIVES":
check_cookie($cookiename);
Header("Location: gotosearch3);
break;
}
I tried putting the check_cookie statement in and outside of the switch
statement, but both places perform the cookie check, fail it, but don't
redirect me, and continue to allow me to search? What is wrong with my
code? Is there something I'm missing about how I'm handling my
headers/cookies? I have the check_cookie function working on several other
parts of the site, but for some reason I can't get this to work .. :(
Thanks,
Chad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]