Re: Maintain " and ' in html textfields
| From: | Leif K-Brooks | Date: | Wed, 05 Mar 2003 04:13:44 +0000 |
| Subject: | Re: Maintain " and ' in html textfields | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138231@lists.php.net to get a copy of this message | ||
www.php.net/htmlentities
Daniel Guerrier wrote:
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/-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.