I'm very new to coding, total noob, and I'm trying to print out a text based on grades. Like if they choose 1, then print "Bad", etc. I'm thinking I could use if/else, but I'm so new to coding I don't know. I've been googling, but I just dont know who to get the form and the text to work together. Can anyone help please?
<section class="evaluation">
<h2>Test</h2>
<p>More info here</p>
<p>Gve this a grade [1-6]</p>
<form action="evaluation.php" method="post">
<select class="evalSelect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
<input class="evalButton" type="submit" name="name" value="Give grade">
</form>
</section>
I'f I can use something like this, how can I get it to work togehter with the form above?
switch ($grade) {
case "1":
echo "Bad";
break;
case "2":
echo "Not so bad";
break;
case "3":
echo "Better";
break;
case "4":
echo "Even better";
break;
case "5":
echo "Good";
break;
case "6":
echo "Very good";
break;
}
?>