title: value of checkbox to database
body: <p>Been trying to get the values ​​of the checkbox in to the database but failed, 
  anyone have tips on how I can get the values ​​of the checkbox in to my datbasen?</p>
  
  <p>Then a question, how can I run post action in the same file?</p>
  
  <p>My code so long:</p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("db_info");
  
  // Check connection
  if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
  
  $sql="INSERT INTO mass (gift, name, epost, interest) 
  VALUES 
  ('$_POST[gift_nor]','$_POST[name_nor]','$_POST[epost_nor]','$_POST[interest_nor]')";
  
  
  if (!mysqli_query($con,$sql))
    {
    die('Error: ' . mysqli_error($con));
    }
  echo "1 record added";
  
  mysqli_close($con);
  ?&gt;
  
  
  &lt;form method="post" action=""&gt;
  
      &lt;input type="radio" name="gift_nor" value="present_1"&gt;present_1&lt;br&gt;
      &lt;input type="radio" name="gift_nor" value="present_2"&gt;present_2&lt;br /&gt;
      &lt;input type="radio" name="gift_nor" value="present_3"&gt;present_3
  
      &lt;hr /&gt;
  
      Namn: &lt;input type="text" name="name_nor"&gt;
      Epostadress: &lt;input type="text" name="epost_nor"&gt;
  
      &lt;hr /&gt;
  
      &lt;input type="checkbox" name="interest_nor[]" value="int_1"&gt;I have a bike&lt;br&gt;
      &lt;input type="checkbox" name="interest_nor[]" value="int_2"&gt;I have a car&lt;br /&gt;
      &lt;input type="checkbox" name="interest_nor[]" value="int_3"&gt;I have a computer
  
      &lt;hr /&gt;        
  
      &lt;input name="Send" type="submit" id="Skicka"&gt;
  &lt;/form&gt;
  </code></pre>