HOw do i validate radio buttons for PHP?

sandycool9999

New member
I just have a simple form:

<form name="Stumarks" action="lala.php" method="GET">
Semester: <br />
<input type="radio" name="semester" value="<?php echo [1]; ?>" />Fall<br />
<input type="radio" name="semester" value="<?php echo [2]; ?>" />Spring<br />
<input type="submit" value="submit"/>
</form>

ANd i want to validate it so that if the user has not selected one of the radio buttons than an error message pops up. It does this because as the user presses submit, it sends the data to the lala.php where it is validated and then if there is an error, then the data gets sent back with the values entered into the form but there is an error message beside the form.
 
Back
Top