note 59689 deleted from function.str-replace by bjori
| From: | bjori@php.net | Date: | Sun, 26 Mar 2006 22:20:31 +0000 |
| Subject: | note 59689 deleted from function.str-replace by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106665@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Mainma - another (possibly better) way would be to use the 'mysql_real_escape_string'
method:
$modified_text = mysql_real_escape_string($modified_text);
$results = mysql_query("INSERT INTO ... (..., ..., ...)
VALUES ('...', '...', '$modified_text')");
This way, MySQL will actually store "<img src=image.jpg border='0'>"
regardless of the fact that it contains the quote character you used.
I hope this helps someone.