title: multiple level login form not working.. while submitting
body: <p><strong>dont know why this form is not working.... while i submit this after putting username and password.. it donot show any thing after submission</strong>  </p>
  
  <pre><code>&lt;?php 
   include "connect_to_mysql.php";
   if(isset($_POST['log']))
   {
   $user= $_POST['user'];
   $pass=md5($_POST['pass']);
  
     $sql=mysql_query("select* from login where user= '$user' AND pass='$pass'    LIMIT 3 ");
    $data=mysql_fetch_array($sql);
  
    $UserName= $data['user'];   
    $Password= $data['pass'];
    $type= $data['type'];
    $name= $data['name'];
  
    if($user==$username &amp;&amp; $pass==$password){
    session_start();
    $_SESSION['name']=$name;
    if($type=='admin')
    {
           header("location: index.php");
    }
    else if($type=='vender1')
   {
           header("location: vender1.php");
    }
  
   }
  
  
  
  
    else {
          echo 'That information is incorrect, try again &lt;a href="index.php"&gt;Click Here&lt;/a&gt;';
      exit();
    }
    }
    ?&gt;
  </code></pre>
  
  <p><strong>database is created manually and login table has 5 columns named as id, name. user, pass, type.</strong></p>
  
  <pre><code>     &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
      &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
     &lt;head&gt;
     &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
     &lt;title&gt; Log In &lt;/title&gt;
     &lt;link rel="stylesheet" href="style.css" type="text/css" media="screen" /&gt;
     &lt;/head&gt;
  
     &lt;body&gt;
     &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
     &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
     &lt;div id="mainWrapper"&gt;
     &lt;?php include_once("header.php") ?&gt;&lt;/div&gt;
     &lt;div id="pageContent"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
     &lt;div align="right" style="margin-right:24px; color:#FF0000"&gt;
     &lt;h2&gt;Please Log In To Manage the Inventary&lt;/h2&gt;
     &lt;br /&gt;&lt;br /&gt;
     &lt;form id="form" name="form" method="post" action="login.php"&gt;
       &lt;h2 style="padding-right:200px;"&gt;User Name:&lt;/h2&gt;
         &lt;input name="user" type="text" id="user" size="40"   style="height:20px;" /&gt;
       &lt;br /&gt;&lt;br /&gt;
       &lt;h2 style="padding-right:210px;"&gt;Password:&lt;/h2&gt;
       &lt;input name="pass" type="password" id="pass" size="40" style="height:20px;" /&gt;
      &lt;br /&gt;
      &lt;br /&gt;
      &lt;br /&gt;
  
        &lt;input type="submit" name="button" id="button" value="Log In" /&gt;
  
      &lt;/form&gt;
     &lt;p&gt;&amp;nbsp; &lt;/p&gt;
     &lt;/div&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     &lt;/div&gt;
  
      &lt;/div&gt;
       &lt;/body&gt;
       &lt;/html&gt;
  </code></pre>
  
  <p><strong>i m stucked here.. please make me out of this</strong></p>