note 38628 deleted from function.str-replace by nlopess
| From: | nlopess@php.net | Date: | Wed, 31 Dec 2003 09:39:37 +0000 |
| Subject: | note 38628 deleted from function.str-replace by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62715@lists.php.net to get a copy of this message | ||
Note Submitter: Dan Keeling
----
I know there are enough examples here, but I would like to add mine:
When sending input into mysql SP or query, there are problems with the user enters: ' or "
simple enogh fix
function removequerychars($querysting)
{
$replace_chars = array("'", '"');
$replace_with = array("", "");
return( str_replace($replace_chars, $replace_with, $querysting) ) ;
}