php - Passing variable value to URL -
i want pass variable value url problem when first clicked search button value doesn't appear , when second clicked triggered variable value shown. how can fix this? think fault when click search button page refreshing. can me this?
here's code:
<div class="form-inline form-padding"> <form action="student.php?classid=<?php echo $classid;?>" method="post"> <input type="text" class="form-control" name="search" placeholder="search id or name"> <select name="subject" class="form-control" required> <option value="">select subject...</option> <?php while($row = mysql_fetch_array($mysubject)): ?> <option value="<?php echo $row['id']?>" <?php if($row['id']==$classid) echo 'selected'; ?>><?php echo $row['subject'];?></option> <?php endwhile; ?> </select> <button type="submit" name="submit" id="submit" class="btn btn-primary"><i class="fa fa-search"></i> search</button> <a href="print.php?classid=<?php echo $classid; ?>" target="_blank"><button type="button" name="submit" class="btn btn-success"><i class="fa fa-print"></i> print</button></a> </form> </div>
in
<form action="student.php?classid=<?php echo $classid;?>" method="post"> change to
<form action="student.php" method="post"> 
Comments
Post a Comment