Re: Passing form values with quotes, to itself
| From: | Jim Lucas [php] | Date: | Wed, 13 Feb 2002 19:16:48 +0000 |
| Subject: | Re: Passing form values with quotes, to itself | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16917@lists.php.net to get a copy of this message | ||
Try this.
<input type="text" name="Body"
value="<?=htmlspecialchars($Body)?>">
That should to the job.
Jim Lucas
----- Original Message -----
From: "Faye Keesic" <fkeesic@fortfrances.com>
To: <php-db@lists.php.net>
Sent: Wednesday, February 13, 2002 10:02 AM
Subject: [PHP-DB] Passing form values with quotes, to itself
> Hi there.
>
> I have a form that contains several fields w/ text info (which may or may
> not contain single and double quotes).
>
> When the user clicks Preview, the form's action is set to call itself
> ($PHP_SELF), and the info is displayed nicely so they can read it over,
and
> verify it before saving to the db.
>
> What I'm having problems with is that when the data has quotes, the text
> data cuts off.
>
> If I use: <input type="text" name="Body" value=" <?php echo
> $Body; ?>">
> then double quotes are cut off.
>
> If I use: <input type="text" name="Body" value=' <?php echo
> $Body; ?>'>
> then single quotes are cut off.
>
> I want nothing cut off! I've tried addslashes()..still cuts off.
>
> I hope that all made sense...
> --
> Faye
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>