php - database value are not show when page refresh -


i building form in 2 combo box 1st combo having more 6 value , 2 , combo having 2 value when user select combo 1 choose value , select combo 2 1st value , press submit open home.php fetch value database , show. problm-1- when refresh page value not print. problem-2- next want when user select combo1 choose value , select combo2 , choose second value open page.

  <?php    session_start();     ?>  <html>  <body>       <fieldset>          <select id = "mylist" name= "casetype" class="form-login" style="width:250px;" >            <option value = "d">d</option>            <option value = "e">e</option>            <option value = "a">a</option>            <option value = "c">c</option>            <option value = "f">f</option>            <option value = "s">s</option>            <option value = "b">b</option>            <option value = "w">w</option>            <option value = "t">t</option>            <option value = "r">r</option>          </select>      </fieldset>        </div>    <div id="login-box-name" style="margin-top:20px;">    revision:</div>   <div id="login-box-field" style="margin-top:20px;">   <fieldset>            <select id = "mylist" name="revision" class="form-login" style="width:250px;">            <option value = "1">r0</option>            <option value = "2">r1</option>           </select>    </fieldset>               <?php            $_session['var']=$_post['casetype'];     mysql_connect("localhost", "root","") or die(mysql_error());         mysql_select_db("court1") or die(mysql_error());    $data = mysql_query("select * causelist     casetype= '" . $_session['var'] . "'")    or die(mysql_error());        while($info = mysql_fetch_array( $data ))       {     print " <td width=15px style=word-wrap:break-word;text-align:center;height:40px; >";      echo $info['caseno'];      print"</td> ";      print " <td style=word-wrap:break-word;text-align:left; width=20px;height:40px;>";      echo $info['party2'];      print"</td> ";      print " <td style=word-wrap:break-word;text-align:left; width=20px;height:40px;>";      echo $info['party2'];      print"</td> ";       print"</tr> ";       print"</table> "; 


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -