adi, Monday, July 08, 2002, 10:05:56 AM, you wrote: a> I have a problem in php page: a> i want to insert into mysql database value $string with newlines: a> $string="-line1\n -line2 \n-line3";
a> $result2 = db_query("update table1 set column1= '$string' where ID = a> '$IDcurent'") or db_die(); a> When i try to view in a textarea control the new value from column1, the a> newlines a> disappear! a> ps.column 1 have type "text" or "varchar(100)" a> Is a problem of type? You should escape some chars: http://www.mysql.com/doc/S/t/String_syntax.html Take a look at php functions: mysql_escape_string(), mysql_real_escape_string(), addslashes() -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php