php - Displaying mysql data through hidden field values -
i trying display mysql records through hidden field values, nothing displays. little help!
here's code; html:
<form name="form11" method="post" action="hpdata.php" enctype="multipart/form-data"> <input name="pro" id="pro" type="hidden" value= "cms" /> <input name="piror" id="piror" type="hidden" value= "p1" /> <input name="stat" id="stat" type="hidden" value= "in progress" /> <input type="submit" name="submit" id="submit" class="groovybutton" value="..."> </form>
php:
<?php $project = $_post["pro"]; $pirority = $_post["piror"]; $status = $_post["stat"]; mysql_connect ("one", "two", "three"); mysql_select_db ("wsms"); $rest = mysql_query("select * sheet project='$project' , pirority='$pirority' , status='$status'"); while($row = mysql_fetch_array($rest)) { echo $row['id'] . " " . $row['date']; echo "<br>"; } ?>
first of check if data coming in post or not:
<?php echo "<pre>"; print_r($_post); exit; ?>
if yes remove print code provided , , use extract($_post); @ top of php code. query become this:
$rest = mysql_query("select * sheet project='$pro' , pirority='$piror' , status='$stat'");
Comments
Post a Comment