title: Inserting data from html to php to mysql database
body: <p>I have done my research but have found nothing specific enough to my problem
  I have an HTML form, asking for data, then a php script that is suppose to put the data in a mysql database</p>
  
  <p>When i try it on my localhost, i dont get any errors
  but when i check on phpmyadmin, there is no new data</p>
  
  <p>the html:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  
  &lt;form action="insert.php" method="post"&gt;
  ID: &lt;input type="text" name="ID"&gt;&lt;br&gt;
  Family ID: &lt;input type="text" name="Family_ID"&gt;&lt;br&gt;
  First Name: &lt;input type="text" name="First_Name"&gt;&lt;br&gt;
  Last Name: &lt;input type="text" name="Last_Name"&gt;&lt;br&gt;
  Gender: &lt;input type="text" name="Gender"&gt;&lt;br&gt;
  Birthday: &lt;input type="text" name="Birthday"&gt;&lt;br&gt;
  Birthplace: &lt;input type="text" name="Birthplace"&gt;&lt;br&gt;
  Father ID: &lt;input type="text" name="Father_ID"&gt;&lt;br&gt;
  Mother ID: &lt;input type="text" name="Mother_ID"&gt;&lt;br&gt;
  Maiden Name: &lt;input type="text" name="Maiden_Name"&gt;&lt;br&gt;
  Mariage ID: &lt;input type="text" name="Mariage_ID"&gt;&lt;br&gt;
  Deathdate: &lt;input type="text" name="Deathdate"&gt;&lt;br&gt;
  Deathplace: &lt;input type="text" name="Deathplace"&gt;&lt;br&gt;
  Grave Location: &lt;input type="text" name="Grave_Location"&gt;&lt;br&gt;
  Email: &lt;input type="text" name="Email"&gt;&lt;br&gt;
  Phone: &lt;input type="text" name="Phone"&gt;&lt;br&gt;
  Address: &lt;input type="text" name="Adress"&gt;&lt;br&gt;
  Bio: &lt;input type="text" name="Bio"&gt;&lt;br&gt;
  Studies: &lt;input type="text" name="Travail"&gt;&lt;br&gt;
  Travail: &lt;input type="text" name="Travail"&gt;&lt;br&gt;
  Photo: &lt;input type="text" name="Photo"&gt;&lt;br&gt;
  Fete: &lt;input type="text" name="Fete"&gt;&lt;br&gt;
  &lt;input type="Submit"&gt;
  
  &lt;/form&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the php:</p>
  
  <pre><code>$username='root';
  $password='121395';
  $database='genealogy';
  mysql_connect("localhost",$username,$password);
  @mysql_select_db($database) or die( 'Unable to select database');
  echo "Connected to MySQL";
  
  $ID=mysql_real_escape_string($_POST['ID']);
  $Family_ID=mysql_real_escape_string($_POST['Family_ID']);
  $First_Name=mysql_real_escape_string($_POST['First_Name']);
  $Last_Name=mysql_real_escape_string($_POST['Last_Name']);
  $Gender=mysql_real_escape_string($_POST['Gender']);
  $Birthday=mysql_real_escape_string($_POST['Birthday']);
  $Birthplace=mysql_real_escape_string($_POST['Birthplace']);
  $Father_ID=mysql_real_escape_string($_POST['Father_ID']);
  $Mother_ID=mysql_real_escape_string($_POST['Mother_ID']);
  $Maiden_Name=mysql_real_escape_string($_POST['Maiden_Name']);
  $Mariage_ID=mysql_real_escape_string($_POST['Mariage_ID']);
  $Deathdate=mysql_real_escape_string($_POST['Deathdate']);
  $Deathplace=mysql_real_escape_string($_POST['Deathplace']);
  $Grave_Location=mysql_real_escape_string($_POST['Grave_Location']);
  $Email=mysql_real_escape_string($_POST['Email']);
  $Phone=mysql_real_escape_string($_POST['Phone']);
  $Address=mysql_real_escape_string($_POST['Adress']);
  $Bio=mysql_real_escape_string($_POST['Bio']);
  $Travail=mysql_real_escape_string($_POST['Travail']);
  $Photo=mysql_real_escape_string($_POST['Photo']);
  $Fete=mysql_real_escape_string($_POST['Fete']);
  
  
  $query = "INSERT INTO bouan (ID, Family_ID, First_Name, Last_Name, Gender, Birthday, 
  Birthplace, Father_ID, Mother_ID, Maiden_Name, Mariage_ID,Deathdate, Deatchplace,
  Grave_Location, Email, Phone, Adress, Bio, Travail, Photo, Fete) VALUES 
  ('$ID','$Family_ID','$First_Name','$Last_Name','$Gender','$Birthday','$Birthplace',
  '$Father_ID','$Mother_ID','$Maiden_Name','$Mariage_ID','$Deathdate','$Deathplace',
  '$Grave_Location','$Email','$Phone','$Address','$Bio','$Travail','$Photo','$Fete')";
  
  mysql_query($query) or die ("Error updating database");
  
  mysql_error();
  mysql_close();
  </code></pre>
  
  <p>All i get in return is:</p>
  
  <p>Connected to MySQLError updating database</p>
  
  <p>whats wrong? (i HAVE done my research, over 2 days fyi)
  im sorry that im new to this, cant help it</p>