title: how to insert data from a select box using php
body: <p>I have come across a problem when inserting values from a html select in to a mysql database. I can't seem to get the values to insert for some reason; I have looked for help on this but they keep giving me errors.
  Also, can some please tell me what the difference between mysql and mysqli?</p>
  
  <p>php code</p>
  
  <pre><code>&lt;?php
  $con = mysql_connect("localhost","barsne","bit me");
  if (!$con) {
      die('Could not connect: ' . mysql_error());
  }
  
  mysql_select_db("testing", $con);
  
  $sql="INSERT INTO client_details (id, f_name, l_name, phone, email, job_est) VALUES
     ('', '$_POST[f_name]', '$_POST[l_name]', '$_POST[phone]', '$_POST[email]', '$_POST[job_est]')";
  
  if (!mysql_query($sql,$con)) {
      die('Error: ' . mysql_error());
  }
  
  echo "Thank you for booking a with us we will contact you in the next 24 hours to confirm your booking with a time and date";
  
  mysql_close($con)
  ?&gt;
  </code></pre>
  
  <p>html code</p>
  
  <pre><code>&lt;form method="post" action="processing_booking.php"&gt;
      &lt;h4&gt;&lt;u&gt;Basic Contact Details&lt;/u&gt;&lt;/h4&gt;
      &lt;label&gt;First Name&lt;/label&gt;
      &lt;input type="text" name="f_name"&gt;
      &lt;label&gt;Last Name:&lt;/label&gt;
      &lt;input type="text" name="l_name" id="l_name"&gt;
      &lt;label&gt;Phone Number:&lt;/label&gt;
      &lt;input type="text" name="phone" id="phone"&gt;
      &lt;label&gt;Email:&lt;/label&gt;
      &lt;input type="text" name="email" id="email"&gt;
  
      &lt;h4&gt;&lt;u&gt;Job Details&lt;/u&gt;&lt;/h4&gt;
      &lt;label&gt;You Would Like To Book A:&lt;/label&gt;
      &lt;select name="job_est"&gt;
          &lt;option value="select"&gt;--SELECT--&lt;/options&gt;
          &lt;option value="job"&gt;Job&lt;/option&gt;
          &lt;option value="est"&gt;Estimation&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;label&gt;Service Your Booking:&lt;/label&gt;
      &lt;select name="job_type"&gt;
          &lt;option value="select"&gt;--SELECT--&lt;/option&gt;
          &lt;option value="gardening"&gt;Gardening&lt;/option&gt;
          &lt;option value="landscaping"&gt;Landscaping&lt;/option&gt;
          &lt;option value="painting"&gt;Painting &amp; Decorating&lt;/option&gt;
          &lt;option value="decking"&gt;Decking &amp; Fencing&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;label&gt;Any Additional Information &lt;/label&gt;
      &lt;textarea name="extra_info"&gt;&lt;/textarea&gt;
      &lt;input type="submit" value="lets get your dreams started"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>sorry wirting is not my strong point</p>