Re: form variables

From: Date: Tue, 10 Sep 2002 04:40:43 +0000
Subject: Re: form variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115817@lists.php.net to get a copy of this message
The text field only has newlines (\n) not breaks. For starters, in the text area tag, you need wrap="virtual": <TEXTAREA name="mailingAddress" wrap="virtual" rows="6" cols="40"></TEXTAREA> Then instead of print "$mailingAddress<br>"; try print nl2br($mailingAddress)."<br>"; ... which converts all new lines (\n) into breaks (<br />) Regards, Justin on 10/09/02 2:21 PM, Hans Prins (df@funktastik.tmfweb.nl) wrote: > Hello, > > I have a form field of the type "scrolling text box" it lets users input a > multiline string. I then pass this string as a variable to a php document > that prints this string to the screen: > > print "$mailingAddress<br>"; > > however..... this outputs it all in one line. > Does anyone have an idea as to how I can print this to the screen in the > same way the user has input the info: in multiple lines? > > Thanks in advance :-) > >

« previous php.general (#115817) next »