I cheat. when I am putting something into a hidden field that will have
HTML - I base64_encode it. then when the receiving page gets it I
decode it. It keeps the html from accidentally showing up and "hides"
it from the user. It's ugly - but effective.
Simon Allison wrote:
Hey,
I have a form which allows users to enter a message and then submits to a
confirmation page which displays the submitted message, and it has a form
with a hidden field which uses php to retrieve the message posted from the
initial page and posts that message if the user clicks the submit button
which confirms that it is correct.
However included in the message is a link to a file, and while the message
is displayed correctly on the confirmation page, it has trouble putting the
message into the hidden field, (some goes in the field and some is printed
on the webpage. The code I have used to retrieved the message and store it
in the hidden field is:
<input name="msg" type="hidden" id="msg" value="<?php echo $_POST['msg']
?>" >
However, when I ran the script all that as stored in the hidden field was:
Please use the link below to download my newsletter<br/><a href=\
And on the confirm page where the hidden field is the page had written:
Click here to download and view newsletter " >
Obviously this has something to do with the quotation marks in the a href
statement, however I am new to php and my attempts using addslashes and
stripslashes have failed. I would be most grateful if anyone could help me.
Cheers,
Simon
--
Respectfully,
Ligaya Turmelle
"Life is a game.... so have fun"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php