I have a form in HTML with some radio buttons on it. When I click the submit button I want some PHP code to investigate the form's submitted contents and then act upon it accordingly. Example of my form is below:
<form action="<?=markForm()?>" method="post">
<input type=radio name="Q1" value="1" <?=$Q1Ans = 1?>> Option1 <br>
<input type=radio name="Q1" value="2" <?=$Q1Ans = 2?>> Option2 <br>
<input name="submit" type="button" value="Mark my test">
</form>
I want the markForm() function to be called when the submit button is clicked. In this function I want to see which radio button was clicked using the variable $Q1Ans. At the end of this markForm() function I want to navigate to another HTML page, how do I do this? I am a complete novice at PHP so please be patient with me. Thanks.