On the *2nd* page request you can check for your cookie in
$HTTP_COOKIE_VARS. If it is not there, cookies are disabled in the browser.
Here's a kludge to make your "first" page the 2nd page request: just start
your session on index, then META redirect to the next page; this 2nd page is
where you actually output HTML to the browser, and also check for the
cookie.
function check_cookies() {
global $HTTP_COOKIE_VARS;
if(!$HTTP_COOKIE_VARS["PHPSESSID"]) {
// redirect to the cookie error page;
exit();
}
Kirk
> -----Original Message-----
> From: Jeff Gannaway [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] Must Have Cookies. PHP/JavaScript
> The same page MUST identifier whether the cookie was accepted
> or not. I've
> seen sites like NetFlix.com that will test to see if their cookie was
> accepted, and if not, print up a page that says "Sorry,
> you've got have
> your Cookies on or go somewhere else."
>
> Does anyone know how to do this with PHP, Java, or JavaScript?
--
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]