It is just easy to add variables after your
html or php file, like
the first one
<a href=second.php?ans1=1?ans2=2>NEXT QUESTION</a>
the second one
<a href=third.php?ans1=$ans1?ans2=$ans2?$ans3=3?$ans4=4>NEXT QUESTION</a>
And the final one will be a form post to a php file which includes a mail function.