using cookies
| From: | Ken Nagorski | Date: | Sat, 23 Nov 2002 19:51:52 +0000 |
| Subject: | using cookies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-125737@lists.php.net to get a copy of this message | ||
Hi there,
I have never used cookies before, however I am trying to implement them to
make things a little more secure. Rather than passing a sql statement via a
hidden input tag I am setting a cookie. This works fine except that when I
look at the sql after it is pulled from the cookie everything is escaped,
for instance.
SELECT * FROM inventory WHERE name='Watches'
would become
SELECT manufacturer FROM inventory WHERE name=\'Watches\'
This is a problem cause trying to use preg_replace doesn't seem to work. I
get an error saying that the delimeter must not be a \. What a bummer. I am
a little stuck. I will take any suggestions. Maybe I am just going about
things the wrong way. *** Shrug ***
Thanks
Ken