What functions can we used for validation textfilelds and email fields. That no one can put the integers in the username field and the text should be valid for the email field both in "php & javascript".

Thanks in advance.

    Regular expression functions like preg_match or eregi (the former being preferred).

    $string = "abc1";
    if( preg_match( '/\d/', $string ))
    {
      $errors['username'] = 'The username field must not contain any numbers';
    }
    

    Have a quick search around this forum for email validation using regular expression - there are lots of ways to do it.

    Curses laserlight..curses! :xbones:

      And in future, try and do your own homework yourself.

        Write a Reply...