|
Posted by Tom Thackrey on 11/05/48 11:16
On 18-May-2005, IWP506@gmail.com wrote:
> Hey all, I'm having some trouble. On a page, I've got a multiline text
> box. When I enter :
>
> a
> b
> c
> d
>
> and hit submit (sending to my post.php page) and from post.php, echo
> $_POST["info"] if shows up as a b c d. No carrige returns show. My
> questions is... how can I do this? I know it's possible because I've
> seen demonstrations, but can't seem to figure out how to do it.
The problem is the browser treats newlines as white space. Change \n to <br>
( str_replace("\n",'<br>',$txt) ) before you echo it to the browser.
--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to jamesbutler@willglen.net (it's reserved for spammers)
[Back to original message]
|