You are here: Re: Multiline Textbox Problems « PHP Programming Language « IT news, forums, messages
Re: Multiline Textbox Problems

Posted by Tom Thackrey on 11/10/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)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация