How do I check if one of two radio buttons is checked with PHP?
How do I check if one of two radio buttons is checked with PHP?
HTML
<form action="" method="post">
<b>Yes or No?</b><br>
Yes <input type="radio" name="template" value="Yes">
NO <input type="radio" name="template" value="No"><br><br>
<input type="submit" name="send" value="Skicka internlogg">
</form>
I don't want one of this two radio buttons to be checked from the
beginning. I want an if-statement that continue with the code if one of
them are checked by the user. And if not I want to print an error code
like "Please fill the whole form" or something. How?
No comments:
Post a Comment