Please, help with this situation: I have simple feedback form with rating buttons by type "radio":
<form action="php/feedback.php" method="post">
<input type="text" class="form-control" id="exampleInput2" placeholder="Name and Surname)" name="q4" required>
<p>Please, rate us!</p>
<label class="radio-inline"><input type="radio" id="inlineRadio1" value="1" name="q5_1"> 1 </label>
<label class="radio-inline"><input type="radio" id="inlineRadio2" value="2" name="q5_2"> 2 </label>
<label class="radio-inline"><input type="radio" id="inlineRadio3" value="3" name="q5_3"> 3 </label>
<label class="radio-inline"><input type="radio" id="inlineRadio4" value="4" name="q5_4"> 4 </label>
<label class="radio-inline"><input type="radio" id="inlineRadio5" value="5" name="q5_5"> 5 </label>
</form>
And my php code:
<?
$adminemail="test@test.mymail";
$date=date("d.m.y");
$time=date("H:i");
$backurl="http://test.mymail";
$q4=$_POST['q4'];
if ($_POST['q5_1']==="1") echo $q5_1=$_POST['q5_1'];
if ($_POST['q5_2']==="2") echo $q5_1=$_POST['q5_2'];
if ($_POST['q5_3']==="3") echo $q5_1=$_POST['q5_3'];
if ($_POST['q5_4']==="4") echo $q5_1=$_POST['q5_4'];
if ($_POST['q5_5']==="5") echo $q5_1=$_POST['q5_5'];
{
$msg="
Name: $q4
Rate: $q5_1 $q5_2 $q5_3 $q5_4 $q5_5
";
mail("$adminemail", "$date $time Feedback from $q4", "$msg" ,"Content-type:text/plain; charset=utf-8");
print "<script language='Javascript'><!-- function reload() {location = \"$backurl\"}; setTimeout('reload()', 2000); //--></script>
<p>Redirecting....</p>";
exit;
}
?>
And data from the radio buttons do not enter the message. And I do not know how to make it work. Thanks for your help!