title: Information is not saved in mysql database after submitting in form
body: <p>This is the code for saving the information into <strong>mysql</strong> database from a FORM.<br>
  In the <strong>HTML</strong> section the form is being handled i.e. retrieving required data from user.<br>
  In the <strong>PHP</strong> section storing data has been handled.<br>
  But the problem is it doesn't store data.<br>
  I'm using <strong>XAMPP</strong> server.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;signup&lt;/title&gt;
      &lt;link rel="stylesheet" href="css/insert.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="maindiv"&gt;
      &lt;!--HTML form --&gt;
          &lt;div class="form_div"&gt;
              &lt;div class="title"&gt;&lt;h2&gt;Insert Data In Database Using PHP.&lt;/h2&gt;      &lt;/div&gt;
  
              &lt;form action="signup.php" method="post"&gt;    &lt;!-- method can be set POST for hiding values in URL--&gt;
                  &lt;h2&gt;Form&lt;/h2&gt;
  
                  &lt;label&gt;Name:&lt;/label&gt;
                  &lt;br /&gt;
                  &lt;input class="input" type="text" name="name" value=""  /&gt;
                  &lt;br /&gt;
                  &lt;label&gt;Email:&lt;/label&gt;&lt;br /&gt;        
                  &lt;input class="input" type="text" name="mail"  value=""  /&gt;
                  &lt;br /&gt;
  
                  &lt;label&gt;Phone:&lt;/label&gt;&lt;br /&gt;        
                  &lt;input class="input" type="text" name="phone"  value=""  /&gt;
                  &lt;br /&gt;
                  &lt;label&gt;Password:&lt;/label&gt;&lt;br /&gt;        
                  &lt;input class="input" type="text" name="pass"  value=""  /&gt;
                  &lt;br /&gt;
  
                  &lt;label&gt;Address:&lt;/label&gt;&lt;br /&gt;
                  &lt;textarea rows="5" cols="25" name="add"&gt;&lt;/textarea&gt;
                  &lt;br /&gt;
  
                  &lt;input class="submit" type="submit" name="submit"    value="Insert" /&gt;  
  
  &lt;?php
  //Establishing Connection with Server
  $connection = mysql_connect("localhost", "root", "buet2010");
  
  //Selecting Database from Server
  $db = mysql_select_db("tanni", $connection);
  if(isset($_POST['submit'])){
  
  //Fetching variables of the form which travels in URL
  
  $name = $_POST['name'];
  $mail = $_POST['mail'];
  $phone = $_POST['phone'];
  $pass = $_POST['pass'];
  $add = $_POST['add'];
  if($name !=''||$email !=''){
  //Insert Query of SQL
  $query = mysql_query($db, "INSERT INTO user (name, mail, phone, pass, add)VALUES('$name', '$mail', '$phone', '$pass', '$add')");
  echo "&lt;br/&gt;&lt;br/&gt;&lt;span&gt;Data Inserted successfully...!!&lt;/span&gt;";
  }
  else{
  echo "&lt;p&gt;Insertion Failed &lt;br/&gt; Some Fields are Blank....!!&lt;/p&gt;";   
  }
  
  }
  //Closing Connection with Server
  mysql_close($connection);
  ?&gt;                  
              &lt;/form&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>I don't understand what can be the problem.  </p>
  
  <p>Thanks all. I got the problem.<br>
  Actually the sequence of the column in my database was not matching with the query in php code. </p>