I'm having a problem posting form data from one html page to the next. The basic structure of the first page is that a question will be answered yes or no through clicking on the respective submit button, i.e. they click the 'yes' button and the value 'yes' is passed onto the next page.
The code for these two submit buttons is as follows:
<form method="post" action="Diagnosis2.php">
<input type="submit" name="Answer" value="Yes">
</form>
<form method="post" action="Diagnosis2.php">
<input type="submit" name="Answer" value="No">
</form>
The trouble is on the next html page the embedded php doesn't seem to receive a value.
i.e.
<?
if($Answer == "Yes")
{
echo ".....";
}
elseif($Answer == "No")
{
echo ".....";
}
?>
Nothing is echoed!! I can get this to work using a jump menu or radio buttons instead of the two submit buttons, but i really would prefer the two submit buttons.
Can someone please help, it's driving me crazy!
Thanks, Sarah