Re: Checkbox ?
| From: | Marius Ursache | Date: | Fri, 12 Apr 2002 10:07:01 +0000 |
| Subject: | Re: Checkbox ? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18449@lists.php.net to get a copy of this message | ||
if you read about cookies in manual, you can see that you have (must) set a
cookie before you send any output to browser... so if you send output before
"if(isset $aa)"
you will have an error. to avoid this look @ "LXII. Output Control
Functions"
Dave Carrera a écrit :
> Hi all
>
> I have a checkbox field in a form and want to set a cookie to the values
> below.
>
> Using the code below it always returns "NO" errr why?
>
>
>
> <?
>
> if(isset($chkpost)){
>
> setcookie("ckpst","YES","/");
>
> }
>
> else
>
> {
>
> setcookie("ckpst","NO","/");
>
> }
>
>
>
> As always I thank you in advance for any pointers or code snippets.
>
>
>
> Dave Carrera
>
> Php Developer
>
> http://davecarrera.freelancers.net
>
> http://www.davecarrera.com
>
>
>
>
--
Marius Ursache (3563 || 3494)
\|/ ____ \|/
"@'/ ,. \`@"
/_| \__/ |_\
\__U_/