title: How To Send Spaces To MySQL Database
body: <p>I have a form which contains some checkboxes and in one of the checkboxes, it contains a value of 'Liberal Democrats'. Once I submit this off to the database, the value isnt recorded as it has a space in it. How do I fix this problem? The following is the relevant bits of my form:</p>
  
  <pre><code>    &lt;label&gt;Party Standing For Election&lt;/label&gt;
    &lt;input name="Conservatives" type="checkbox" value="Conservatives" /&gt; Conservative
    &lt;input name="Liberal Democrats" type="checkbox" value="Liberal Democrats" /&gt; Liberal Democrats
    &lt;input name="Labour" type="checkbox" value="Labour"  /&gt; Labour
  </code></pre>
  
  <p>it goes to this php page:</p>
  
  <pre><code>    &lt;?php
  
  $name = $_REQUEST['name'];
  $date = $_REQUEST['date'];
  $month = $_REQUEST['month'];
  $year = $_REQUEST['year'];
  $labour = $_REQUEST['Labour'];
  $libdems = $_REQUEST['Liberal Democrats'];
  $conservatives = $_REQUEST['Conservatives'];
  
  
  $con = mysql_connect("****************************");
  if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
  
  mysql_select_db('******', $con);
  
  $sql="INSERT INTO elections (name_of_election, date, month, year, party1, party2, party3) VALUES ('$name','$date', '$month','$year','$labour', '$libdems', '$conservatives')";
  
  if (!mysql_query($sql,$con))
    {
          die('Error: ' . mysql_error());
    }
    else 
    {
        echo '&lt;h2&gt;An Election Has Been Created&lt;/h2&gt;';
  
    }
  ?&gt;
  </code></pre>
  
  <p>help?</p>