note 59689 added to function.str-replace

From: Date: Tue, 13 Dec 2005 15:15:10 +0000
Subject: note 59689 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-100068@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59689 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59689&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59689&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59689&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59689&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59689&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59689&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59689&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59689&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100068) next »