On Fri, 16 Jul 2004, John W. Holmes wrote:

> Let's say you have $_POST['text'] from the user.
>
> To display the value back to the user with magic_quotes_enabled, you'd
> do this:
>
> echo htmlentities(stripslashes($_POST['text']));
>
> To put the value into a hidden form element, you'd do this:
>
> <input type="hidden" name="text"
> value="<?=htmlentities(stripslashes($_POST['text']))?>">
>
> Now, $_POST['text'] will come out correctly on Page 3. Since you seem to
> have magic_quotes_gpc enabled, you can put the value directly into your
> query.

Actually when I tried the above example nothing was entered into the
database. This worked.. htmlentities($_POST['text']).

Thanks,

Ed

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

Reply via email to