The problem is that $_POST['radio']
doesn't exist the way you have your form setup. Only things with a name=
are passed to the $_POST
superglobal.
Change the condition in your PHP handler to this:
$radio = isset($_POST['Eval CH']) ? $_POST['Eval CH'] : $_POST['Eval ELL'];
But, you really have 3 conditions here:
$_POST['Eval CH']
$_POST['Eval ELL']
None selcted
So really your shorthand doesn't work here because you need
if
elseif
else
So you really need more advanced handling, like so:
if (isset($_POST['Eval CH'])) {
$to = 'blah@blah.com';
}
elseif (isset($_POST['Eval ELL'])) {
$to = 'sigh@sigh.com';
}
else {
$to = 'default@default.com';
}
Hope this helps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…