RE: [PHP] This should be simple...
| From: | Boget, Chris | Date: | Fri, 20 Apr 2001 13:58:34 +0000 |
| Subject: | RE: [PHP] This should be simple... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-49562@lists.php.net to get a copy of this message | ||
> > <INPUT TYPE ="text" blab blab VALUE = "Here's the text "in
> > quotes"">
> > Well, obviously there's a problem with that. The form field will show
> > "Here's the text " and then thinks it ends. Is there any way to get
> > around this, other than stripping out her quotes? Thanks,
> http://php.net/htmlentities
Or, even better, just use addslashes();
$query = "INSERT INTO table VALUES = ( " . addslashes( $formField ) . " )";
That way the quotes will remain in the value to display.
Chris