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_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php