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

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -