title: how to automatically move next page when data fetched from database is stored in text field
body: <p>I have php page where i have text field where I enter a number . The data are stored in database. I need to fetch the number entered in the text field to be automatically displayed in the next page and it as to disble where the user cannot modify it. please suggest how can i do this using php, jquery. Pls tel me how can i do it.. And the values entered in the second page as to go and fit in the database to the the number which i have entered in the first page.</p>
  
  <pre><code>//first page
  &lt;table border="0" style="border-collapse:collapse;" align="center"&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;div id="col1" align="center"&gt;&lt;br /&gt;
   &lt;form method="post" action="user.php"&gt;
  &lt;label type="text" name="name" maxlength="50" size="30" class="label"&gt;Enter the Membership Number&lt;/label&gt;&lt;br /&gt;
  &lt;input type="text" name='id' placeholder="enter Membership Number" class="input" size="40"/&gt;&lt;br /&gt;
  &lt;span class="field"&gt;(* Required field)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;input type="submit" name="submit" value="SUBMIT" class="button"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;?php
  mysql_connect("localhost","root","");
  mysql_select_db("anthonys");
  if(isset($_POST['submit']))
  {
  $id= $_POST['id'];
  if( ! ctype_alnum($id) )
    die('invalid id');
  
  
  $query = "SELECT uid FROM `payment` WHERE `uid` =$id";
  
  
  $run = mysql_query($query);
  
  echo $id;
  if(mysql_num_rows($run)&gt;0){
  
  echo "&lt;script&gt;window.open('member1.php','_self')&lt;/script&gt;";
  
  }
  else {
  
      echo "&lt;script&gt;alert('Login details are incorrect!')&lt;/script&gt;";
      }
  }
  ?&gt;
  
  //second page
  
  $(function() {
          $("#XISubmit").click(function(){
  
     var uid=document.forms["XIForm"]["uid"].value;
          var fathername = document.forms["XIForm"]["fathername"].value;
  
  
          if(fathername == null || fathername == "")
      {
          alert("Please Enter  Father's Name");
          return false;
      }
  
      document.getElementById("XIForm").submit();
  
          }); 
              if ($.browser.msie &amp;&amp; $.browser.version.substr(0, 1) &lt; 7) {
              $('li').has('ul').mouseover(function() {
                  $(this).children('ul').show();
              }).mouseout(function() {
                  $(this).children('ul').hide();
              })
          }
  ;
      }); 
  
  &lt;/script&gt;&lt;/head&gt;
  
  
  
  &lt;section id="sheet"  style="background-color: Transparent;"&gt;
  
  &lt;div id="content_inner"&gt;
  
  
  &lt;header id="header_inner"&gt;St. Anthony's Parish Education Fund
  &lt;br /&gt;&lt;b style="font-size:15px;"&gt;Bangalore 560 095&lt;/b&gt;&lt;br /&gt;&lt;img src="images/line1.jpg" alt="" /&gt;&lt;/header&gt;
  
  
  
  &lt;div id="col2"&gt;
  &lt;h2&gt;Application for the Membership&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;table border="0px" style="border-collapse:collapse; width:810px;" align="center"&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;form name="XIForm" id="XIForm" method="POST" action="pdf/pdf1.php"&gt;
  &lt;input type="text" name="uid" /&gt;
  &lt;label type="text" name="fathername" maxlength="50" size="30" class="label"&gt;Father's Name&lt;/label&gt;&lt;br /&gt;
  &lt;input  name="fathername" placeholder="" class="input" size="40"/&gt;&lt;br /&gt;&lt;br /&gt;
  
  
  
  
  
  
  
      &lt;input type="hidden" name="formType" id="formType" value="reg"/&gt;
          &lt;input type="button" name="XISubmit" id="XISubmit" value="ADD" class="button" /&gt;        
  
  
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;/form&gt;&lt;/td&gt;
  </code></pre>
  
  <p>This code doesnt fetch the value from the first page.</p>