Re: textarea!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You need to use nl2br

http://ca.php.net/manual/en/function.nl2br.php


Marco

-------------
php|architect -- The Monthly Magazine For PHP Professionals
Come visit us on the web at http://www.phparch.com!

On Fri, 2002-11-08 at 09:30, Siamak Sadeghianfar wrote:
> Hi
> I've written a guestbook in php
> user writes a message in a texarea and in the code I insert it in a table 
> and then in showpage I sow it to him.before I insert the message into table 
> , I use addslashes() and htmlspecialchars(). the prblem is that , when I 
> retrieve the message from the table all sentences are after each other , and 
> there's no break!!!! that makes a bad appearance.
> I mean for example someone write in the texarea as following :
> --
> Hi
> how r u?
> what happened there?!
> --
> 
> when I show the message to him the appearance is this way :
> --
> Hi how r u? what happened there?!
> --
> 
> what should I do to show him exactly how he wrote the message?
> 
> thanx
> 
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE* 
> http://join.msn.com/?page=features/junkmail
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux