Note Submitter: spiritual-coder at spiritual-coder dot com
----
I had a problem with newline-characters ("\\n"
& "\\r") being converted to their literal
representation ('\\n' & '\\r') giving unwanted
output after fields were converted. To solve this problem I
simply replace the literals again after conversion:
<?
// ...
$field = mysql_real_escape_string($field);
$field = str_replace('\\r', "\\r",
$field);
$field = str_replace('\\n', "\\n",
$field);
$query = "INSERT INTO foo (bar) VALUES
('".$field."'");
mysql_query($query);
?>
Greetz,
Sébastien Jacobs
http://www.spiritual-c
oder.com
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|