Re: textarea new line+mysql update
| From: | adi | Date: | Fri, 05 Jul 2002 13:55:18 +0000 |
| Subject: | Re: textarea new line+mysql update | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105648@lists.php.net to get a copy of this message | ||
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" <Henning@inscriber.com>
To: "'adi'" <adipublic@home.ro>
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:adipublic@home.ro]
> 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
>