use addslashes "update table1 set column1= '".addslashes($string)."' where ID = '$IDcurent'"
Adi wrote: > tx, it's working now > but i still have a problem: > i want to insert into mysql database value $string: > $result2 = db_query("update table1 set column1= '$string' where ID = > '$IDcurent'") or db_die(); > When i try to view in text area the new value from column1, the newlines > disappear! > > ps.column 1 have type "text" or "varchar(100)" > Is a problem of type? > > tx again > adi > > > ----- Original Message ----- > From: "Henning Sittler" <[EMAIL PROTECTED]> > To: "'adi'" <[EMAIL PROTECTED]> > Sent: Friday, July 05, 2002 4:05 PM > Subject: RE: [PHP] textarea new line > > > >>$string="-line1\n -line2 \n-line3"; >> >>\n >> >>Henning Sittler >>www.inscriber.com >> >> >> >>-----Original Message----- >>From: adi [mailto:[EMAIL PROTECTED]] >>Sent: Friday, July 05, 2002 9:04 AM >>To: php-general >>Subject: [PHP] textarea new line >> >> >>i want to add in textarea a string with new line tag in it. how to do > > that? > >>my try: >>$string="-line1n\ -line2 n\-line3"; >>echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>"; >> >>but i see a single line instead of: >>-line1 >>-line2 >>-line3 >> >>tx in advance for any help >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php