title: Error: Unknown column in field list
body: <p>While running the below script it shows the errorError: Unknown column 'email' in 'field list'.</p>
  
  <pre><code>  &lt;?php
    include("connect.php");
  
    if($loggedin == '1')
    die("You can't register another account while you're logged in.");
  
    if(isset($_POST['submit']))
    {
  
    $uname = trim($_POST['username']);
  
   if($_POST["regkey"]!="171717")
   die("Invalid Registration Key. &lt;br&gt; &lt;a href= register.php&gt;Back&lt;/a&gt;");
  
   if($_POST["pass"]!=$_POST["pass2"])
   die("Passwords do not match. &lt;br&gt; &lt;a href= register.php&gt;Back&lt;/a&gt;");
  
   // Make sure all forms were filled out.
  
   if((!isset($_POST['username'])) || (!isset($_POST['pass']))
   || ($uname == '') || ($_POST['pass'] == ''))
   die("Please fill out the form completely. &lt;br&gt;&lt;br&gt;
   &lt;a href=register.php&gt;Continue&lt;/a&gt;");
  
  
   $check = @mysql_query("SELECT id FROM players WHERE username = '$uname'");
   $check = @mysql_num_rows($check);
  
   if($check &gt; 0)
   die("Sorry, that username has already been taken. Please try again.
   &lt;br&gt;&lt;br&gt;
   &lt;a href=register.php&gt;Continue&lt;/a&gt;");
  
  
   $pass = md5($_POST['pass']);
  
   $date = date("m/d/y");
  
  
   $newPlayer = @mysql_query("INSERT INTO players (username, password,   
  
  registered,callname,email) VALUES   ('$uname','$pass','$date','$_POST
  
  [callname]','$_POST[email]')") or die("Error: ".mysql_error());
  
  echo 'You have been registered! You may now &lt;a href=index.php&gt;Log in&lt;/a&gt;.';
  
  
  }
  else
  {
  
  // A simple example of a form.
  
  echo '
  &lt;center&gt;
  &lt;form action=register.php method=post&gt;
  &lt;p&gt;Registration is currently&lt;b&gt; NOT OPEN.&lt;/b&gt;&lt;br&gt;
   You must have a valid Registration key to register.&lt;/p&gt;
   &lt;table border="2"&gt;
   &lt;tr&gt;
  &lt;td&gt;Username:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="username" size="20px"&lt;/input&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Callname:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="callname" size="20px"&lt;/input&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Password:&lt;/td&gt;&lt;td&gt;&lt;input type="password" name="pass" size="20px"&lt;/input&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Re-type Password:&lt;/td&gt;&lt;td&gt;&lt;input type="password" name="pass2" size="20px"&lt;/input&gt;  
  &lt;/td&gt;  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Email:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="email" size="20px"&lt;/input&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Registration Key:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="regkey" size="20px"&gt;&lt;/input&gt;                                                                                         
  
   &lt;/td&gt;    &lt;/tr&gt;
   &lt;/table&gt;
   &lt;input type="submit" name="submit" value="Submit"&gt;&lt;/input&gt;
   &lt;/form&gt;';
  
   }
  
  
   ?&gt;
  </code></pre>
  
  <p>I'm very new to PHP and can't figure out why I'm getting this Error. Shouldn't the $_POST get that value from the form?
  Thanks for reading.</p>