RE: [PHP] Quote in input tag value?

2002-02-07 Thread Rick Emery

I prefer:   print input type=text value=\My Quote\;

-Original Message-
From: Nathan Cassano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 3:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Quote in input tag value?



If there is a quote mark in an input tags value what is the correct way
to print the quote?

input type=text value=quotMy Quotequot

or

input type=text value=\My Quote\


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

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




Re: [PHP] Quote in input tag value?

2002-02-07 Thread Erik Price


On Thursday, February 7, 2002, at 04:54  PM, Rick Emery wrote:

 I prefer:   print input type=text value=\My Quote\;

 -Original Message-

 If there is a quote mark in an input tags value what is the correct way
 to print the quote?

 input type=text value=quotMy Quotequot

 or

 input type=text value=\My Quote\



It probably doesn't really matter, but from a purist's point of view, 
using the (X)HTML entities is probably the best use in this case.  I 
only suggest this because you are using double-quotes for display 
purposes, not for coding purposes, so it's unambiguous what you mean 
when you use them.  To the end user it won't matter, but for another 
reader of your code, it may help.

But again, it's probably more opinion (and if you -are- using the quotes 
for some obscure code, then nevermind what I just wrote).


Erik




Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] Quote in input tag value?

2002-02-07 Thread Jim Lucas [php]

you might want to check your coding, but that is a parse error waiting to
happen.

Jim Lucas
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Nathan Cassano' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 1:54 PM
Subject: RE: [PHP] Quote in input tag value?


 I prefer:   print input type=text value=\My Quote\;

 -Original Message-
 From: Nathan Cassano [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 3:54 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Quote in input tag value?



 If there is a quote mark in an input tags value what is the correct way
 to print the quote?

 input type=text value=quotMy Quotequot

 or

 input type=text value=\My Quote\


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

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




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