title: Retaining the textbox values even after refresh
body: <p>I want to Retain the textbox values even after Refresh of page rather it is successfully submitted. </p>
  
  <p>Using cookies or using php sessions</p>
  
  <p>Here is the code Below :</p>
  
  <pre><code>&lt;div class="block-content collapse in"&gt; 
                           &lt;div class="alert alert-success"&gt;&lt;i class="icon-info-sign"&gt;&lt;/i&gt; Please Fill in required details&lt;/div&gt;                      
                              &lt;form class="form-horizontal" method="post" enctype="multipart/form-data"&gt;                                          
                                  &lt;table style width="100%"&gt;
                                  &lt;tr&gt;
                                  &lt;td&gt;
                                          &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Client Name&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="name" id="name" placeholder="Name of Client" required&gt;
                                              &lt;/div&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;ਨਾਮ&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="namepb" id="transliteratename" placeholder="ਨਾਮ" required&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
  
                                  &lt;/td&gt;
                                  &lt;td&gt;    
                                          &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="datepicker1"&gt;&lt;b&gt;Client's DOB&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="dob" id="datepicker1" placeholder="Date of Birth mm/dd/yyyy" required&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                  &lt;/td&gt;
  
                                  &lt;td&gt;
                                  &lt;div id="image-preview"&gt;
                                  &lt;label for="image-upload"&gt;Choose File&lt;/label&gt;
                                  &lt;input type="file" name="Photo" id="image-upload" required/&gt;
                                  &lt;/div&gt;
                                  &lt;/td&gt;   
  
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                  &lt;td&gt;
                                          &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Father's Name&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="fname" id="inputPassword" placeholder="Client Father's Name" required&gt;
                                              &lt;/div&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;ਪਿਤਾ ਦਾ ਨਾਮ&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="fnamepb" id="transliteratefname" placeholder="ਪਿਤਾ ਦਾ ਨਾਮ" required&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                  &lt;/td&gt;   
  
                                  &lt;td&gt;        
                                      &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Mobile Number&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="mobile" id="mobile" placeholder="Client's Mobile Number" required&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
  
                                  &lt;/td&gt;                               
                                  &lt;/tr&gt;   
  
                                  &lt;tr&gt;
                                  &lt;td&gt;
                                          &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Address&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;textarea class="text" style="width:63%"; id="address" name="address" placeholder="Your Full Address" required&gt;&lt;/textarea&gt;
                                              &lt;/div&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;ਪਤਾ &lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;textarea class="text" style="width:63%"; id="transliterateaddress" name="addresspb" placeholder="ਪੂਰਾ ਪਤਾ" required&gt;&lt;/textarea&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;    
                                      &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Landline&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="landline" id="landline" placeholder="Client's Landline" required&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;  
                                  &lt;/td&gt;
                                  &lt;/tr&gt;
                                  &lt;tr&gt;
  
                                  &lt;td&gt;    
                                  &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;City&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="city" id="inputPassword" placeholder="VPO / City" required&gt;
                                              &lt;/div&gt;
  
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;ਸ਼ਹਰ&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="citypb" id="transliteratecity" placeholder="ਵ.ਪ.ਓ / ਪਸ਼ਹਰ" required&gt;
                                              &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;    
                                  &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Tehsil&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="tehsil" id="inputPassword" placeholder="Tehsil" required&gt;
                                              &lt;/div&gt;
  
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;ਤੇਹ੍ਸਿਲ&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="tehsilpb" id="transliteratetehsil" placeholder="ਤੇਹ੍ਸਿਲ " required&gt;
                                              &lt;/div&gt;
                                  &lt;/div&gt;          
                                  &lt;/td&gt;
                                  &lt;/tr&gt;
                                  &lt;p&gt; &lt;/p&gt;
                                  &lt;tr&gt;
                                  &lt;td&gt;    
                                  &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Distt.&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="distt" id="inputPassword" placeholder="District" required&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;ਡਿਸਟ੍ਰਿਕ&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="disttpb" id="transliteratedistt" placeholder="ਡਿਸਟ੍ਰਿਕਟ" required&gt;
                                              &lt;/div&gt;
                                  &lt;/td&gt;
  
                                  &lt;td&gt;
                                  &lt;label class="control-label" style="font-size: 16px;" for="inputPassword"&gt;&lt;b&gt;Any Add. Details&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;select name="add" id="add" required&gt;
                                              &lt;option  value=""&gt;---Select---&lt;/option&gt;
                                              &lt;option  value="yes"&gt;Yes&lt;/option&gt;
                                              &lt;option  value="no"&gt;No&lt;/option&gt;
                                              &lt;/select&gt;
                                              &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                  &lt;td&gt;
                                  &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" id="la-add-address" for="inputPassword"&gt;&lt;b&gt;Additional Address&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;textarea class="text" style="width:63%"; id="addaddress" name="addaddress" placeholder="Your Full Address"&gt;&lt;/textarea&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;  
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                  &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" id="la-add-city" for="inputPassword"&gt;&lt;b&gt;City&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="addcity" id="addcity" placeholder="VPO / City"&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;      
                                  &lt;/td&gt;
                                  &lt;/td&gt;
                                  &lt;tr&gt;
                                  &lt;td&gt;
  
                                  &lt;div class="control-group"&gt;
                                              &lt;label class="control-label" style="font-size: 16px;" id="la-add-mob" for="inputPassword"&gt;&lt;b&gt;Mobile&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                              &lt;input type="text" class="span8" name="addmob" id="addmob" placeholder="Client's Mobile Number"&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;      
                                  &lt;/td&gt;
                                  &lt;td&gt;
  
                                  &lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                  &lt;td&gt;
                                  &lt;div class="control-group"&gt;
                                           &lt;label class="control-label" style="font-size: 16px;" for="inputEmail"&gt;&lt;b&gt;Type of Loan&lt;/b&gt;&lt;/label&gt;
                                              &lt;div class="controls"&gt;
                                                &lt;select name="loantype_id" class="chzn-select"  required/&gt;
                                                   &lt;option&gt;&lt;/option&gt;
                                                   &lt;?php $loan_type=mysql_query("select * from loan_type")or die(mysql_error()); 
                                                   while ($row=mysql_fetch_array($loan_type)){                                                
                                                   ?&gt;
                                                   &lt;option value="&lt;?php echo $row['loantype_id']; ?&gt;&amp;nbspName&amp;nbsp&lt;?php echo $row['loanname']; ?&gt;"&gt;&lt;?php echo $row['loanname']; ?&gt;&lt;/option&gt;
                                                   &lt;?php } ?&gt;
                                                 &lt;/select&gt;
                                               &lt;/div&gt;
                                          &lt;/div&gt;
                                  &lt;/td&gt;
                                  &lt;/tr&gt;
  
                                  &lt;tr&gt;
                                  &lt;td&gt;
                                          &lt;div class="control-group"&gt;
                                          &lt;div class="controls"&gt;
                                          &lt;button name="save" id="save" data-placement="right" title="Click here to Save your new data." class="btn btn-primary"&gt;&lt;i class="icon-save"&gt;&lt;/i&gt; Next...&lt;/button&gt;               
                                          &lt;/div&gt;
                                          &lt;/div&gt;
                                  &lt;/td&gt;       
                                  &lt;/tr&gt;       
                                          &lt;script type="text/javascript"&gt;
                                          $(document).ready(function(){
                                          $('#save').tooltip('show');
                                          $('#save').tooltip('hide');
                                          });
                                          &lt;/script&gt;
  
                                  &lt;/tr&gt;
                                  &lt;/table&gt;
  
                              &lt;/form&gt;
  </code></pre>
  
  <p>if any idea for this problem to solve it Using Cookies or using PHP Session.</p>