[PHP] PHP using Forms

2001-05-04 Thread Mike Mike

Hello,
I have a form field   
with this data in it:

My Home
11 North 5th St
St. Paul MN
Phone: (555) 555-
Fax: (555) 555-
E-Mail: [EMAIL PROTECTED]

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- Fax: (555) 555- E-Mail:
[EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP using Forms

2001-05-04 Thread Zak Greant

Use the nl2br() function

--zak

- Original Message - 
From: "Mike Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 8:11 AM
Subject: [PHP] PHP using Forms


> Hello,
> I have a form field   COLS=40> 
> with this data in it:
> 
> My Home
> 11 North 5th St
> St. Paul MN
> Phone: (555) 555-
> Fax: (555) 555-
> E-Mail: [EMAIL PROTECTED]
> 
> 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- Fax: (555) 555- E-Mail:
> [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP using Forms

2001-05-04 Thread Jon Haworth

Try this:

$Home = nl2br($Home); // nl2br converts newlines to 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:[EMAIL PROTECTED]]
Sent: 04 May 2001 15:12
To: [EMAIL PROTECTED]
Subject: [PHP] PHP using Forms


Hello,
I have a form field   
with this data in it:

My Home
11 North 5th St
St. Paul MN
Phone: (555) 555-
Fax: (555) 555-
E-Mail: [EMAIL PROTECTED]

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- Fax: (555) 555- E-Mail:
[EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



**
'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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP using Forms

2001-05-04 Thread Altunergil, Oktay

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 ()
function fix($string)
{
return(nl2br(htmlentities($string)));
}


-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 10:16 AM
To: 'Mike Mike'; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP using Forms


Try this:

$Home = nl2br($Home); // nl2br converts newlines to 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:[EMAIL PROTECTED]]
Sent: 04 May 2001 15:12
To: [EMAIL PROTECTED]
Subject: [PHP] PHP using Forms


Hello,
I have a form field   
with this data in it:

My Home
11 North 5th St
St. Paul MN
Phone: (555) 555-
Fax: (555) 555-
E-Mail: [EMAIL PROTECTED]

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- Fax: (555) 555- E-Mail:
[EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



**
'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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP using Forms

2001-05-04 Thread Mike Mike

Thank you all!! :-)

--- "Altunergil, Oktay" <[EMAIL PROTECTED]> 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 ()
> function fix($string)
>   {
>   return(nl2br(htmlentities($string)));
>   }
> 
> 
> -Original Message-
> From: Jon Haworth
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 10:16 AM
> To: 'Mike Mike'; [EMAIL PROTECTED]
> Subject: RE: [PHP] PHP using Forms
> 
> 
> Try this:
> 
> $Home = nl2br($Home); // nl2br converts newlines
> to 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:[EMAIL PROTECTED]]
> Sent: 04 May 2001 15:12
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP using Forms
> 
> 
> Hello,
> I have a form field   COLS=40> 
> with this data in it:
> 
> My Home
> 11 North 5th St
> St. Paul MN
> Phone: (555) 555-
> Fax: (555) 555-
> E-Mail: [EMAIL PROTECTED]
> 
> 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- Fax: (555) 555- E-Mail:
> [EMAIL PROTECTED]
> 
> 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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
>
**
> '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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]


__
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]