passing a php variable by html button value
Posted: Mon Sep 15, 2008 12:35 pm
Hi, I am trying to post a hidden field php value to another php page. If I simply assign a value to the hidden field it works fine - so I know that part works fine. The problem occurs when i try to send the PHP variable - it nothing displays from the other page.
Here is the code:
What am I doing wrong? It should be so simple.
Here is the code:
Code: Select all
<form name="formemail" method="post" action="functions/test.php">
<?php $output = "testing_the_variable"; ?>
<input type="hidden" name="hiddenfield" id="hiddenfield" value= "<?php $output; ?> "
<p><input type="submit" value="Email This Event" id="button" />
</form>