Reading posted form variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux