title: PHP Validate email if value is not empty
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3499192/validate-email-in-php">Validate Email in php</a>  </p>
  </blockquote>
  
  
  
  <p>how to validate email IF user did fill up form field  ( do not validate if field is not modified  ) ?</p>
  
  <p>Example:</p>
  
  <pre><code>if ($formemail ="" ) /* user DIDN'T enter email/not filled up email field  */   
  {
  /* do not validate and do not =mail($,$,$,$) */
  }
  </code></pre>
  
  <p>but if field is modified THEN validate 
  if its ok then =mail($,$,$,$)</p>