Re: [PHP] How to escape in hidden field?

2002-09-03 Thread Martin Thoma

 Try this with single quotes:

  INPUT TYPE=HIDDEN VALUE='Hello world' NAME=Message

Year, but then I couldn't use single-quotes in the text ;-) The problem is that
the content of the field is inserted by the user, so I cannot say if he uses
single- and/or double-quotes.



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




Re[2]: [PHP] How to escape in hidden field?

2002-09-03 Thread Tom Rogers

Hi,

Tuesday, September 3, 2002, 4:35:45 PM, you wrote:
 Try this with single quotes:

  INPUT TYPE=HIDDEN VALUE='Hello world' NAME=Message

MT Year, but then I couldn't use single-quotes in the text ;-) The problem is that
MT the content of the field is inserted by the user, so I cannot say if he uses
MT single- and/or double-quotes.


How about this then...
?
$test = Hello \O'Brian\;
?
INPUT TYPE=HIDDEN VALUE=?echo htmlentities($test)? NAME=Message

No need to decode the returned value



-- 
regards,
Tom


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




Re: [PHP] How to escape in hidden field?

2002-09-03 Thread Jan Kudrman

Try HTMLSpecialChars function.

http://www.php.net/htmlspecialchars

Regards,
Jan


- Original Message - 
From: Martin Thoma [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 02, 2002 11:59 AM
Subject: [PHP] How to escape  in hidden field?


 Hello!
 
 I have a simple hidden input-field like
 INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message
 
 Now sometimes I need to insert  like:
 
 INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message
 But this makes PHP (or the browser?) cutting of the string after Hello
 . How can I escape the ?
 
 Martin
 
 
 
 -- 
 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] How to escape in hidden field?

2002-09-02 Thread Martin Thoma

Hello!

I have a simple hidden input-field like
INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message

Now sometimes I need to insert  like:

INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message
But this makes PHP (or the browser?) cutting of the string after Hello
. How can I escape the ?

Martin



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




Re: [PHP] How to escape in hidden field?

2002-09-02 Thread Tom Rogers

Hi,

Monday, September 2, 2002, 7:59:43 PM, you wrote:
MT Hello!

MT I have a simple hidden input-field like
MT INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message

MT Now sometimes I need to insert  like:

MT INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message
MT But this makes PHP (or the browser?) cutting of the string after Hello
MT . How can I escape the ?

MT Martin

Try this with single quotes:

 INPUT TYPE=HIDDEN VALUE='Hello world' NAME=Message

-- 
regards,
Tom


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




RE: [PHP] How to escape in hidden field?

2002-09-02 Thread Martin Towell

Hi Martin

You can also do this

 INPUT TYPE=HIDDEN VALUE=Hello quot;world NAME=Message

HTH
Martin  :)



-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 11:24 AM
To: Martin Thoma
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] How to escape  in hidden field?


Hi,

Monday, September 2, 2002, 7:59:43 PM, you wrote:
MT Hello!

MT I have a simple hidden input-field like
MT INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message

MT Now sometimes I need to insert  like:

MT INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message
MT But this makes PHP (or the browser?) cutting of the string after Hello
MT . How can I escape the ?

MT Martin

Try this with single quotes:

 INPUT TYPE=HIDDEN VALUE='Hello world' NAME=Message

-- 
regards,
Tom


-- 
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