Does PHP3 setcookie() function have a return value?
| From: | Grant Walters | Date: | Wed, 18 Oct 2000 00:11:01 +0000 |
| Subject: | Does PHP3 setcookie() function have a return value? | ||
| References: | 1 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-20739@lists.php.net to get a copy of this message | ||
Hi,
I have included a setcookie() function in my code which works well.
As per the manual and other references the setcookie function fails if other
output is sent to the browser first.
I note that using @setcookie() supresses the error text, which is good,
however...
The setcookie() function does not seem to return an exit value so how do I
check for success as in?
if setcookie("Cookie") {
echo "All OK";
else
echo "No Good";
}
Regards
Grant Walters
Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265