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
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP function not validating

    HI
    I have this function that doesn't validate user input as required; and inserts values into tables. i.e

    function ur() {
    if(empty($_POST['a'])) {
    if(!eregi('[a-z]', $_POST['a']) {
    print "error";
    }
    }
    call to database insert statement made here
    }
    on the main form

    if(!isset($submit)) {

    ur();
    }

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    You have a previous thread on this topic. It has been moved from the incorrect snippets forum to the correct forum.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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