note 1592 modified in AddSlashes by dams
| From: | dams@php.net | Date: | Mon, 23 Jul 2001 12:04:32 +0000 |
| Subject: | note 1592 modified in AddSlashes by dams | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15697@lists.php.net to get a copy of this message | ||
Using an oracle database addslashes
doesn`t work to escape single quotes.
You have to double the single quote
instead. Here is an example using
ereg_replace:
<p>
$escaped_string =
ereg_replace("'","''",$string_with_single_quotes);
http://www.php.net/manual/en/addslashes.php