note 59146 deleted from function.str-replace by bjori

From: Date: Sun, 26 Mar 2006 22:17:44 +0000
Subject: note 59146 deleted from function.str-replace by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106657@lists.php.net to get a copy of this message
Note Submitter: mainma at club-internet dot fr ---- In mdn_abn's code, there is another thing that can fail in some situations. If the text with the links is submited then to MySQL database like this: $results = mysql_query("INSERT INTO ... (..., ..., ...) VALUES ('...', '...', '$modified_text')"); it will fail. In fact, each image remplaced by replaceImg() appears like this: <img src=image.jpg border='0'> So that " ' " symbol closes the value of $modified_text for MySQL. Instead, write just $htmlImg = "<img src=$link border=0>"; I am not sure about the old browsers, but it works fine with IE6 and Netscape 8.

« previous php.notes (#106657) next »