RE: [PHP] Setcookie
| From: | Jason Radley | Date: | Fri, 31 Aug 2001 16:00:13 +0000 |
| Subject: | RE: [PHP] Setcookie | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65513@lists.php.net to get a copy of this message | ||
<?php
$alertthem = "Testing your browser for cookies.";
if(empty($check)){
$page = "$PHP_SELF?check=1";
header("Location: $page");
setcookie("testcookie","1");
}
else{
if(empty($testcookie)){
$alertthem = "<H3>Please enable cookies.<br>You need cookies to shop this
site</h3>";
}
else{
header("Location: somepage.php3");
}
}
?>
-----Original Message-----
From: Galvin, Max [mailto:m.galvin@centralservices.co.uk]
Sent: Friday, August 31, 2001 9:45 AM
To: 'php-general@lists.php.net'
Subject: [PHP] Setcookie
Is there any way to see whether or not the cookie setting has actually
worked without going to another page? I suspect there isn't but I'd like
confirmation ;)
Cheers
Max
--
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