[PHP] addslashes/stripslashes issue

2005-05-27 Thread JM
Hi all,
Ok here is what I need help with:

$var = i like fi'sh;

I'm able to addslashes(gather the data from a form), submit into the
database, stripslashes(retrieve it).

My problem is when I display it in a input type=text form the single
quote is causing a truncation.

input type=text value={$var}  
will display as: 
i like fi   
in the text form...

Any help?

-- 
John

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



Re: [PHP] addslashes/stripslashes issue

2005-05-27 Thread Rasmus Lerdorf
JM wrote:
 Hi all,
 Ok here is what I need help with:
 
 $var = i like fi'sh;
 
 I'm able to addslashes(gather the data from a form), submit into the
 database, stripslashes(retrieve it).
 
 My problem is when I display it in a input type=text form the single
 quote is causing a truncation.
 
 input type=text value={$var}  
 will display as: 
 i like fi   
 in the text form...
 
 Any help?

Which browser is doing that?  If you really have double-quotes around
the value then single quotes inside shouldn't truncate anything.

eg.

  http://lerdorf.com/test.html

Do you see the single quote there?

-Rasmus

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



Re: [PHP] addslashes/stripslashes issue

2005-05-27 Thread John Nichel

JM wrote:

Hi all,
Ok here is what I need help with:

$var = i like fi'sh;

I'm able to addslashes(gather the data from a form), submit into the
database, stripslashes(retrieve it).

My problem is when I display it in a input type=text form the single
quote is causing a truncation.

input type=text value={$var}  
will display as: 
i like fi   
in the text form...


Any help?



http://us4.php.net/htmlentities

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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