My database fields are: id,name,email_id,address,phone_no,username,password,category,date
<?php
     include_once('connect_to_mysql.php');
     if(isset($_POST["submit"])){
        $a=mysql_real_escape_string($_POST["name"]);
        $b=mysql_real_escape_string($_POST["email"]);
        $c=mysql_real_escape_string($_POST["address"]);
        $d=mysql_real_escape_string($_POST["phoneno"]);
        $e=mysql_real_escape_string($_POST["user"]);
        $f=mysql_real_escape_string($_POST["pass"]);
        $g=mysql_real_escape_string($_POST["category"]);
        $res=mysql_query("insert into reg(name, email_id, address, phone_no, username, password, category, date ) values ( '$a', '$b', '$c', '$d', '$e', 'md5[$f]', '$g', now() )")  or die (mysql_error() );
        $id = mysql_insert_id();
    }
?>
There's no error reported when using the submit button, but found data is not inserted into database. I don't know what causes this.
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title> Register </title>
  </head>
   <body>
       <div id="heading12"><?php //include_once("header.html") ?></div>
           <br /><br /><br /><br /><br /><br /><br />
       <div id="mainWrapper" style="background-color:#ECEEFB">
       <div align="center" id="pageContent" style="background-image:url(back3.png); width:1000px;"><br /><br /><br />
       <div align="center" style="color:#000000;">
       <h2 style="font-size:36px">Please Fill Your all Details to Register</h2>
       <br /><br />
       <form id="form" name="form" method="post" action="register.php">
         <h2 style="padding-right:200px;"> Name:</h2>
         <input name="name" type="text" id="name" size="40" style="height:30px; font-size:20px " required placeholder="Enter NAME"/>
           <br /><br />
        <h2 style="padding-right:200px;">Email Address:</h2>
        <input name="email" type="text" id="email" size="40" style="height:30px; font-size:20px " required placeholder="Enter Email Address"/>
           <br /><br />
        <h2 style="padding-right:200px;">Address</h2>
        <textarea name="address" id="address" cols="44" rows="6" style="font-size:19px " required placeholder="Enter Address"></textarea>
   <br /><br />
        <h2 style="padding-right:200px;">Phone No.</h2>
        <input name="phoneno" type="text" id="phoneno" size="40" style="height:30px; font-size:20px" required placeholder="Enter Phone No."/>
        <br /><br />
        <h2 style="padding-right:200px;">User Name:</h2>
        <input name="user" type="text" id="user" size="40" style="height:30px; font-size:20px" required placeholder="Enter UserName"/>
        <br /><br />
        <h2 style="padding-right:210px;">Password:</h2>
        <input name="pass" type="password" id="pass" size="40" style="height:30px; font-size:20px" required placeholder="Enter Password"/>
        <br /> <br />
        <h2 style="padding-right:250px;">Category:</h2> 
        <select name="category" id="category" style="height:30px; font-size:20px; padding-right:290px;" required placeholder="Enter The Value" >
           <option value="none">Choose Any</option>
           <option value="product buyer">Product Buyer</option>
           <option value="product seller">Product Seller</option>
       </select>
       <br /> <br />
       <img style="padding-right:280px;" src="generate.php"><br /><br />
       <input type="text" name="secure" size="10" required placeholder="Enter The Value" style="padding-right:290px; height:30px; font-size:20px">
       <br />  <br /> <br />
       <input type="submit" name="log" id="log" value="Register"  style="padding-right:40px; font-size:20px" />
    </form>
    <p>  </p>
 </div>
   <br />
  <br />
   <br />
    </div>
    </div>
      </body>
    </html>
 
     
     
     
    