Is there anyway to redirect the user after posting a HTML form?
I have a form which looks like this
<form action="/URL/" method="post">
<input type="radio" name="answer" value="W" />W<br />
<input type="radio" name="answer" value="X" />X<br />
<input type="radio" name="answer" value="Y" />Y<br />
<input type="radio" name="answer" value="Z" />Z<br />
<input type="submit" />
</form>
Is there anyway I can redirect the user to a new page after they click the submit button? I found a bit of javascript however that seemed to stop the post from working :S
Cheers!
If you’re using PHP, do it on the server:
Note that you should be using a full URL in the
header()call, and that you likely want toexit()after callingheader()in this case.