radio button value in php
Posted
by Crash893
on Stack Overflow
See other posts from Stack Overflow
or by Crash893
Published on 2010-04-05T19:30:19Z
Indexed on
2010/04/05
19:33 UTC
Read the original article
Hit count: 316
Im trying to make a simple survey in php
I have a set of radio buttons on a page called sja.php that sends its to sjamail.php page
the problem is that when i go to get
$answer = $_POST['ans'];
I can't seen to do anything like
echo "$answer";
but if i were to throw some logic at it
like
if ($answer == "ans1") {
echo 'Correct';
}
else {
echo 'Incorrect';
}
IT will display correct or incorrect
so why is it i can't access the value of the radio button ans?
© Stack Overflow or respective owner