Maintain " and ' in html textfields
| From: | Daniel Guerrier | Date: | Wed, 05 Mar 2003 03:41:42 +0000 |
| Subject: | Maintain " and ' in html textfields | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138221@lists.php.net to get a copy of this message | ||
If I have text containing quotes, single or double in
my database, and I try to set the text as a value for
my html text field. The quote in the text will
prematurely close the value="" or value='' html and
cut of the remainder of the text. How can I prevent
this.
I curently have this:
<input name="title" type="text" id="title" size="100"
maxlength="255" <? echo( "value=\"" .
stripslashes($row[0]) . "\">"); ?>
If I try to set the value to - bla bla "something"
I'll get bla bla
If I use value='' then the same happens for bla bla 'something'
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/