note 8263 added to AddSlashes
| From: | gareth at murton dot co dot uk | Date: | Sat, 02 Sep 2000 23:36:46 +0000 |
| Subject: | note 8263 added to AddSlashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3969@lists.php.net to get a copy of this message | ||
hi...i am having lots of trouble with the addslashes..
i am using the following to strip < > and | from a form input
for(reset($HTTP_POST_VARS);
$key=key($HTTP_POST_VARS);
next($HTTP_POST_VARS)) {
$this = addslashes($HTTP_POST_VARS[$key]);
$this = stripslashes($HTTP_POST_VARS[$key]);
$this = strtr($this, "><|", " ");
$$key = $this;
which also stops the /" problem in mySQL when people enter just "
however, if a ' appears anywhere in the form, the reuslts are not posted to mysql...can anyone
help?
summary: i want to stip <>| from a form, and stop the \' and '"
please help!
thanks
http://www.php.net/manual/function.addslashes.php