Re: Re: setcookie security concerns [medium]

From: Date: Fri, 17 Mar 2006 14:30:19 +0000
Subject: Re: Re: setcookie security concerns [medium]
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-232120@lists.php.net to get a copy of this message
Rafael:
<?php $thestyle= htmlentities($_POST['thestyle']); setcookie ('thestyle', $set, time()+31536000, '/', '', 0); header("Location: $HTTP_REFERER"); ?>
Actually, you receive $set via GET, so you should use $_GET instead of $_POST.
Yes, you are correct. In my example -- http://www.sperling.com/examples/styleswitch/ -- the value doesn't look like it is being added to the url and thus I mistakenly thought it was a POST. I wonder why the value isn't apparently attached to the url in this case? tedd -- -------------------------------------------------------------------------------- http://sperling.com

« previous php.general (#232120) next »