title: html5 form not submitting nor taking action to mysql table using php
body: <p>php form not submitting or doing any action from the form to my database despite following all the rules for connecting the form to mysql with php</p>
  
  <p>the php code supposed to get the infor from the form using the name tags but no action nor any error occurs when the data is submitted</p>
  
  <p>HTML Form</p>
  
  <pre><code>&lt;form id="contactForm" method="post" action="register.php"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-6 wow fadeInLeft"&gt;
              &lt;div class="input-group"&gt;
                  &lt;label class="sr-only" for="name"&gt;Name&lt;/label&gt;
                  &lt;span class="input-group-addon" id="basic-addon1"&gt;&lt;i class="fa fa-user"&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;input id="name" name="name" type="text" class="form-control"  required="" placeholder="Name"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-6 wow fadeInRight"&gt;
              &lt;div class="input-group"&gt;
                  &lt;label class="sr-only" for="email"&gt;Email address&lt;/label&gt;
                  &lt;span class="input-group-addon" id="basic-addon2"&gt;&lt;i class="fa fa-envelope"&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;input id="email" name="email" type="email" class="form-control" required="" placeholder="Email"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-6 wow fadeInLeft"&gt;
              &lt;div class="input-group"&gt;
                  &lt;label class="sr-only" for="phone"&gt;Phone&lt;/label&gt;
                  &lt;span class="input-group-addon" id="basic-addon3"&gt;&lt;i class="fa fa-phone"&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;input id="phone" name="mobile" type="tel" class="form-control" placeholder="Phone"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-6 wow fadeInRight"&gt;
              &lt;div class="input-group"&gt;
                  &lt;label class="sr-only" for="subject"&gt;Location&lt;/label&gt;
                  &lt;span class="input-group-addon" id="basic-addon4"&gt;&lt;i class="fa fa-file-text"&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;input id="subject" name="location" type="text" class="form-control" required="" placeholder="location"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-6 wow fadeInLeft"&gt;
              &lt;div class="input-group"&gt;
                  &lt;label class="sr-only" for="phone"&gt;Username&lt;/label&gt;
                  &lt;span class="input-group-addon" id="basic-addon3"&gt;&lt;i class="fa fa-phone"&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;input id="phone" name="username" type="text" class="form-control" required=""placeholder="username"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-6 wow fadeInRight"&gt;
              &lt;div class="input-group"&gt;
                  &lt;label class="sr-only" for="subject"&gt;Password&lt;/label&gt;
                  &lt;span class="input-group-addon" id="basic-addon4"&gt;&lt;i class="fa fa-file-text"&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;input id="subject" name="password" type="text" class="form-control" required="" placeholder="password"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-12 wow fadeInRight"&gt;
              &lt;div class="input-group"&gt;
                   &lt;label class="sr-only" for="subject"&gt;Interest&lt;/label&gt;
                   &lt;span class="input-group-addon" id="basic-addon4"&gt;&lt;i class="fa fa-file-text"&gt;&lt;/i&gt;&lt;/span&gt;
                   &lt;input id="subject" name="interest" type="text" class="form-control" required="" placeholder="interest"&gt;
               &lt;/div&gt;
           &lt;/div&gt;
       &lt;/div&gt;
       &lt;input type="submit" class="btn btn-primary btn-lg btn-block" name="submit" value="Register"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>PHP Form</p>
  
  <pre><code>if (isset($_POST['submit'])) {
  $name = $_POST['name'];
  $mobile = $_POST['mobile'];
  $email = $_POST['email'];
  $cusername = $_POST['username'];
  $cpassword = $_POST['password'];
  $location = $_POST['location'];
  $interest = $_POST['interest'];
  
   $sql = "INSERT INTO users(name,email,mobile,location,username,password,interest) 
      VALUES('$name','$email','$mobile','$location','$cusername','$cpassword','$interest')";
      mysql_query($sql) or die(mysql_error());
      session_start();
      $_SESSION['username']=$cusername;
  echo "&lt;script type=\"text/javascript\"&gt;
  alert(\"Registration Complete , you will be redirected shortly\");
  window.location = \"profile.php\"
  &lt;/script&gt;";
  }
  </code></pre>
  
  <p>please advice what seems to be the problem that i am missing or not seeing </p>