Advertisement
Guest User

Untitled

a guest
Jun 14th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. $testemail = trim($_POST['cEmail']);
  2.   //Check to make sure sure that a valid email address is submitted
  3.   if(trim($_POST['cEmail']) == '')  {
  4.     $hasError = true;
  5.     $errorMsg = "email brak";
  6. } else if (!preg_match('^[a-zA-Z0-9_.+-]+\@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,4}$', $testemail)) {
  7.  $hasError = true;
  8.  $errorMsg = "email zły";
  9.   } else {
  10.     $email = trim($_POST['cEmail']);
  11.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement