title: Form duplications
body: <p>I am having a tough time figuring out how to write an if function in my code.  I am trying to prevent my PHP form from allowing duplicates being submitted to my MySQL database.  I am wanting to prevent a submission based on the email address being inputted into my form.  Can someone guide me in the right direction?  Thanks.</p>
  
  <pre><code>&lt;?php
    $dbc = mysqli_connect('n/a', 'n/a', 'n/a', 'n/a')
      or die('Error connecting to MySQL server.');
  
    $store_name = $_POST['storename'];
    $full_name = $_POST['fullname'];
    $address = $_POST['address'];
    $city = $_POST['city'];
    $state = $_POST['state'];
    $zip = $_POST['zip'];
    $phone = $_POST['phone'];
    $fax = $_POST['fax'];
    $email = $_POST['email'];
    $url = $_POST['url'];
  
    $query = "INSERT INTO store_location (store_name, full_name, address, city, state, zip,     phone, fax, email, url)  VALUES ('$store_name', '$full_name', '$address', '$city',     '$state', '$zip', '$phone', '$fax', '$email', '$url')";
    mysqli_query($dbc, $query)
  or die('Error querying database.');
  
    echo 'New TeachPro store added.';
     echo '&lt;br/&gt;&lt;br/&gt;';
  
    mysqli_close($dbc);
      ?&gt;
  </code></pre>