How do i validate that if new user doesn't enter ' @ ' on email, an error comes?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1025466/email-address-validation">email address validation</a>  </p>
</blockquote>



<pre><code>&lt;?php

require_once('includes/inc_auth2.php');
require_once('includes/config.php');
//require_once('auth3.php');


    if (isset($_POST['Submit'])) {


        $title=$_POST['title'];
        $forename = $_POST['forename']; 
        $surname=$_POST ['surname'];
        $dob=$_POST ['dob'];
        $gender=$_POST ['gender'];
        $email=$_POST['email']; 
        $phone=$_POST['phone'];
        $password=$_POST ['password'];


        if (authRegister($title, $forename, $surname, $dob, $gender, $email, $phone, $password))
        {
            echo 'Thank you for registering your details, you can now login'; 

            } 
            else
                {
                    outputErrors();
                    }



        if (empty($title))
            addError("Enter your title!",LEVEL_CUSTOMER);

        if (empty($forename))
            addError("Enter your name!",LEVEL_CUSTOMER);

        if (empty($surname))
            addError("Enter your surname!",LEVEL_CUSTOMER);

        if (empty($dob))
            addError("Enter your date of birth!",LEVEL_CUSTOMER);

        if ($gender == '0')
            addError("Enter your gender!",LEVEL_CUSTOMER);

        if (empty($email))
            addError("Enter your email!",LEVEL_CUSTOMER);

        if (empty($password))
            addError("Enter your password!",LEVEL_CUSTOMER);

}

?&gt;


&lt;?=outputErrors()?&gt;
 &lt;div id="form_style"&gt;

   &lt;form name="Create_Account" method="post" action="?page=register"&gt;

        &lt;label&gt; Title: &lt;/label&gt;
            &lt;select name="title" id="title"&gt;
             &lt;option value="0"&gt;Select Title&lt;/option&gt;
&lt;?
        #
            foreach($titlesArray as $key =&gt; $value){

    // if title is selected 
            if ($title == $key)
            $selected = true; 
            else
            $selected = false; 

            echo '&lt;option value="'.$key.'"';

            if($selected) 
            echo ' selected="selected"';

            echo '&gt;'.$value.'&lt;/option&gt;';
        }
    ?&gt;
    &lt;/select&gt; 
 &lt;br /&gt;


    &lt;label&gt;Forename:&lt;/label&gt;
        &lt;input name="forename" type="text" value="&lt;?php if(isset($_POST['forename'])){  echo $forename; } ?&gt;" /&gt; &lt;br /&gt;

    &lt;label&gt;Surname:&lt;/label&gt;
        &lt;input name="surname" type="text" value="&lt;?php if(isset($_POST['surname'])){  echo $surname; } ?&gt;" /&gt; &lt;br /&gt;

    &lt;label&gt;Email:&lt;/label&gt;
        &lt;input name="email" type="text" value="&lt;?php if(isset($_POST['email'])){  echo $email; } ?&gt;" /&gt; &lt;br /&gt;

            &lt;label&gt;phone:&lt;/label&gt;
        &lt;input name="phone" type="text" value="&lt;?php if(isset($_POST['email'])){  echo $email; } ?&gt;" /&gt; &lt;br /&gt;

    &lt;label&gt;Password:&lt;/label&gt;
        &lt;input name="password" type="password" value="&lt;?php if(isset($_POST['password'])){  echo $password; } ?&gt;" /&gt; &lt;br /&gt;

    &lt;label&gt;Confirm Password:&lt;/label&gt;
        &lt;input name="password" type="password" value="&lt;?php if(isset($_POST['password'])){  echo $password; } ?&gt;" /&gt; &lt;br /&gt;


    &lt;label&gt; Gender: &lt;/label&gt;
        &lt;select name="gender" id="gender"&gt;
        &lt;option value="0"&gt;Select Gender&lt;/option&gt;
        &lt;?
        #
        foreach($gendersArray as $key =&gt; $value){

    // if gender is selected 
            if ($gender == $key)
            $selected = true; 
            else
            $selected = false; 

            echo '&lt;option value="'.$key.'"';

            if($selected) 
            echo ' selected="selected"';

            echo '&gt;'.$value.'&lt;/option&gt;';
            }
            ?&gt;
            &lt;/select&gt; 

           &lt;br /&gt;


           &lt;label&gt;D.O.B  : &lt;/label&gt;
            &lt;input name="dob" type="text" value="&lt;?php if(isset($_POST['dob'])){  echo $dob; } ?&gt;" /&gt; &lt;br/&gt;

            &lt;input name="Submit" type="submit" value="Register" class="button"&gt;
        &lt;/form&gt;

    &lt;/div&gt;
</code></pre>
