RE: [PHP] PHP using Forms
| From: | Mike Mike | Date: | Fri, 04 May 2001 15:34:08 +0000 |
| Subject: | RE: [PHP] PHP using Forms | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51433@lists.php.net to get a copy of this message | ||
Thank you all!! :-)
--- "Altunergil, Oktay" <oktay@ForSoftInc.com> wrote:
> The below does the newline and takes care of html
> tags which might otherwise
> get parsed by the web browser.
>
> # This function is to fix the characters. It
> replaces all htmlentities with
> their & kind representation
> # and converts newlines to html breaks (<BR>)
> function fix($string)
> {
> return(nl2br(htmlentities($string)));
> }
>
>
> -----Original Message-----
> From: Jon Haworth
> [mailto:JHaworth@witanjardine.co.uk]
> Sent: Friday, May 04, 2001 10:16 AM
> To: 'Mike Mike'; php-general@lists.php.net
> Subject: RE: [PHP] PHP using Forms
>
>
> Try this:
>
> $Home = nl2br($Home); // nl2br converts newlines
> to <br>s
>
> See http://www.php.net/nl2br for more info.
>
> (Incidentally, I answered exactly the same question
> yesterday, in exactly
> the same way. *Please* check the list archives/last
> few days postings/manual
> before posting this sort of thing :-)
>
> HTH
> Jon
>
>
> -----Original Message-----
> From: Mike Mike [mailto:hatchman2000@yahoo.com]
> Sent: 04 May 2001 15:12
> To: php-general@lists.php.net
> Subject: [PHP] PHP using Forms
>
>
> Hello,
> I have a form field <TEXTAREA name="Home" ROWS=10
> COLS=40><? echo $Home ?></TEXTAREA>
> with this data in it:
>
> My Home
> 11 North 5th St
> St. Paul MN
> Phone: (555) 555-5555
> Fax: (555) 555-5555
> E-Mail: hatchman2000@yahoo.com
>
> When submited it goes into a mysql database. The
> problem i'm running into is that the output looks
> like
> this after the call from the mysql database to html:
>
> My Home 11 North 5th St St. Paul MN Phone: (555)
> 555-5555 Fax: (555) 555-5555 E-Mail:
> hatchman2000@yahoo.com.
>
> How do I get it to print out with line breaks like
> how
> I have typed it into the form?
> Thank you
> --Mike
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
>
>
>
**********************************************************************
> 'The information included in this Email is of a
> confidential nature and is
> intended only for the addressee. If you are not the
> intended addressee,
> any disclosure, copying or distribution by you is
> prohibited and may be
> unlawful. Disclosure to any party other than the
> addressee, whether
> inadvertent or otherwise is not intended to waive
> privilege or
> confidentiality'
>
>
**********************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
php-list-admin@lists.php.net
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/