Skip to main content

Form validation? 1212 Responses

Last post: 2 years, 3 months ago | Thread started: Feb 8, 10, 2:15 p.m.

RespondNew TopicDisable Images

Out of context: Response #11 [Feb 8, 10, 2:15 p.m.]

  • ayport

    Can always do it server side:

    HTML:
    <form action="formProcessor.php" method="post">
    <input type="checkbox" value="yes" name="checkbox">
    <input type="submit">
    </form>

    PHP (asp or asp.net works the same):
    <?
    if ($_POST['checkbox'] == "yes")
    {
    // process rest of form
    }
    else
    {
    echo "please check the box";
    }
    ?>

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel

Skip to main content