我有html表單,但我無法將隱藏參數傳遞給下一頁。我想將隱藏的表單傳遞給下一頁,但我無法通過。無法將參數傳遞給php的表單?
我的形式
<form action = "clientpricelistexport/exp_to_excel.php" method = "post">
<input type="hidden" name="clientid" id="clientid" value="<?echo $clientid;?>" >
<table id="CPH_GridView1">
<tbody >
<?php
$dbHost = 'localhost'; // usually localhost
$dbUsername = 'xxx';
$dbPassword = 'xxxx';
$dbDatabase = 'xxxx';
$db = mysql_connect($dbHost, $dbUsername, $dbPassword) or die ("Unable to connect to Database Server.");
mysql_select_db ($dbDatabase, $db) or die ("Could not select database.");
$clientid=$_GET['clientid'];
if($clientid!=""){
$sql = mysql_query("SELECT `clientid` , `clientname`
FROM `client_list`
WHERE `clientid` = '$clientid'");
while($rows=mysql_fetch_array($sql))
{
if($alt == 1)
{
echo '<tr class="alt">';
$alt = 0;
}
else
{
echo '<tr>';
$alt = 1;
}
echo '
<td id="CPH_GridView1_clientid" style="width:140px" class="edit clientid '.$rows["id"].'">'.$rows["clientid"].'</td>
<td id="CPH_GridView1_clientname" style="width:160px" class="edit clientname '.$rows["id"].'">'.$rows["clientname"].'</td>
<td style="width:65px" class="deleteclientlist '.$rows["id"].'"></td>
</tr>';
}
}
?>
</tbody>
</table>
<input type="submit" value="Export" class="export">
</form>
,我嘗試打印在下一頁這樣。
$clientid=$_GET['clientid'];
print $clientid;
但它不打印任何人告訴我,我要去哪裏錯了謝謝。