title: Php Form doesn't sends mysql_query to a database
body: <p>So my <code>PHP</code> Form doesn't sends any information to the database though
  there is a connection to the database!I checked everything couple of
  times but it still doesn't work.</p>
  
  <p>Any Ideas  where i have a problem in my code? Would be very  appreciative for any help!</p>
  
  <pre><code> &lt;!DOCTYPE html&gt;
      &lt;!--[if lt IE 7]&gt;      &lt;html class="no-js lt-ie9 lt-ie8 lt-ie7"&gt; &lt;![endif]--&gt;
      &lt;!--[if IE 7]&gt;         &lt;html class="no-js lt-ie9 lt-ie8"&gt; &lt;![endif]--&gt;
      &lt;!--[if IE 8]&gt;         &lt;html class="no-js lt-ie9"&gt; &lt;![endif]--&gt;
      &lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html class="no-js"&gt; &lt;!--&lt;![endif]--&gt;
          &lt;head&gt;                
              &lt;meta charset="utf-8"&gt;        
              &lt;title&gt;&lt;/title&gt;
              &lt;meta name="description" content=""&gt;
              &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
              &lt;meta name="description" content="Add your business website description here"&gt;
              &lt;meta name="keywords" content="Add your, business, website, keywords, here"&gt;
              &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;
  
              &lt;!-- favicon --&gt;  
              &lt;link rel="shortcut icon" href="favicon.ico" type="image/x-icon"&gt;
              &lt;link rel="icon" href="favicon.ico" type="image/x-icon"&gt;
  
              &lt;!-- google fonts --&gt;
              &lt;link href='http://fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,900%7CMerriweather:400,400italic,300,300italic,700,700italic' rel='stylesheet' type='text/css'&gt;
              &lt;!-- Font icons --&gt;
              &lt;link rel="stylesheet" href="css/vendor/elegant-font-icon.css"&gt;
  
              &lt;!-- stylesheet --&gt;
              &lt;link rel="stylesheet" href="css/vendor/bootstrap.css"&gt;        
              &lt;link rel="stylesheet" href="css/style.css"&gt;
              &lt;link rel="stylesheet" href="css/custom.css"&gt;
              &lt;link rel="stylesheet" href="css/vendor/animate.css"&gt;
              &lt;link rel="stylesheet" href="css/vendor/owl.carousel.css"&gt;
  
  
              &lt;!-- style switcher --&gt;
              &lt;link rel="stylesheet" href="css/vendor/style-switcher.css"&gt;
              &lt;!-- Custom styles for this template --&gt;        
              &lt;link rel="stylesheet" type="text/css" href="css/colors/blue.css" title="blue" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/blue-2.css" title="blue-2" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/purple.css" title="purple" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/green.css" title="green" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/green-2.css" title="green-2" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/yellow.css" title="yellow" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/orange.css" title="orange" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/red.css" title="red" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/red-2.css" title="red-2" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/red-3.css" title="red-3" media="screen"/&gt;        
              &lt;link rel="stylesheet" type="text/css" href="css/colors/pink.css" title="pink" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/pink-2.css" title="pink-2" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/beige.css" title="beige" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/midnight.css" title="midnight" media="screen"/&gt;
              &lt;link rel="stylesheet" type="text/css" href="css/colors/black.css" title="black" media="screen"/&gt;
  
  
              &lt;script type="text/javascript" src="js/vendor/jquery-1.11.0.min.js"&gt;&lt;/script&gt;        
              &lt;script type="text/javascript" src="js/vendor/modernizr.custom.js"&gt;&lt;/script&gt;
              &lt;!--[if lt IE 9]&gt;
                  &lt;script type="text/javascript" src="js/vendor/html5-3.6-respond-1.1.0.min.js"&gt;&lt;/script&gt;
              &lt;![endif]--&gt;
          &lt;/head&gt;    
        &lt;body&gt;
  
  
      &lt;div class="row"&gt;            
                    &lt;fieldset id="contactform" class="wow bounce" data-wow-duration="2s" data-wow-delay="0.5s"&gt; 
                   &lt;form action="http://xxxxx.com/forma.php " method="POST"&gt;            
                      &lt;div id="form_result"&gt;&lt;/div&gt;
                      &lt;div class="row"&gt;
                        &lt;div class="col-md-6 col-md-offset-3"&gt;
                          &lt;input name="name" type="text" id="name" class="form-control" placeholder="Your Name"&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="row"&gt;
                        &lt;div class="col-md-3 col-md-offset-3"&gt;
                          &lt;input name="email" type="text" id="email" class="form-control" value="" placeholder="Your email"&gt;
                        &lt;/div&gt;                
                        &lt;div class="col-md-3"&gt;
                          &lt;input name="phone" type="text" id="phone" class="form-control" value="" placeholder="Your Number"&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="row"&gt;         
                        &lt;div class="col-md-6 col-md-offset-3"&gt;
                          &lt;textarea name="message" cols="40" rows="5" id="comments" class="form-control" placeholder="Your Message"&gt;&lt;/textarea&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="row"&gt;
                        &lt;div class="col-md-12 text-center"&gt;                    
                            &lt;button type="submit" class="btn btn-default btn-lg" id="submit"&gt;SUBMIT&lt;/button&gt;
  
                        &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;/form&gt;
                    &lt;/fieldset&gt;
                    &lt;/div&gt;
  
  
  
                    &lt;/body&gt;
      &lt;/html&gt;
  
  
      &lt;?php
  
      $a=mysql_connect('xxxx','xxxx','xxxx');
  
      $b=mysql_select_db('xxxxx',$a);
  
      if (!$b){
      echo 'no connection db ';
  
      }
      if ($_POST['submit']) {
  
      mysql_query('INSERT INTO form SET name="'.$_POST['name'].'",email="'.$_POST['email'].'",phone='.$_POST['phone'].',message="'.$_POST['message'].'"');
  
      } 
  
  
  
  
  
  
      ?&gt;
  </code></pre>