Forum Moderators: coopster
If candidate one is selected then
assign candidate one to = president variable.
But I am not sure of the syntax?
<form action="out.php" method="post">
<input type="option" id="choice1" name="choice" value="mc carthy" /><label for="choice1">mc carthy</label> <br />
<input type="option" id="choice2" name="choice" value="nixon" /><label for="choice2">nixon</label> <br />
<input type="option" id="choice3" name="choice" value="bush" /><label for="choice3">bush</label> <br />
<br />
<input type="submit" />
</form>
after pressing submit, the variable
$choice should contain the value selected. is it that, what you were looking for?
cb1
cb2
cb3 my president variable is $President
so I am trying to say
If cb1 is clicked then
assign cb1 = $President
else
if cb2 is clicked then
assign cb2 = $President
else
if cb3 is clicked then
assign cb3 = $President
then upon hitting the submit button which ever candidate they voted for would be stored in the variable $President so that I can call that variable on the results page. The code that you gave before is that what it does?
thanks,
Faye