Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: required fields

  1. #1
    Regular Coder
    Join Date
    Nov 2006
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    required fields

    how do i create a required field

  • #2
    Regular Coder Tyree's Avatar
    Join Date
    Sep 2003
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You would have to put some field checking into your form processing script. Checks like:
    PHP Code:
    //If "NAME" was left blank:
    if (!$_POST['name']);
    echo 
    "You forgot to fill in the name field.";
    break;

    You can get a lot more complicated with your error checking than that. But, that should give you the gist of what you can do.
    Matt Tyree
    TyreeOnline
    If I didn't just "make it worse," show me some love! Hit me with the rep points! :) (The white scales icon on the left)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •