我有一個HTML表格,通過PHP以8個不同的值從一個mysql數據庫表填充。 我需要打開第二個頁面並將其中的任意一個傳遞給我,以便從數據庫中查詢另一個值。 到目前爲止,我可以通過href打開第二頁,但我可以解決參數問題。 任何人都可以幫助我嗎?根據html表格數據打開網頁
代碼:
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
include "ligabd.php";//connects to the server
if(!$l)
{
die("Ligação sem sucesso: ".mysql_error());
}
else
{
$query="SELECT escalao FROM escaloes ORDER BY idescaloes ASC";
$result= mysqli_query($l, $query);
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<table id="t01" align="center">
<br>
<br>
<br>
<br>
<tr>
<td align="center">Escalões</td>
</tr>
<?php
while ($record= mysqli_fetch_array($result))
{
$r=$record['escalao'];
?>
<tr>
<td>
<a href="pag_escalao_mensalidade.php?escalao=">
<?php
echo $record['escalao'];
?>
</a>
</td>
</tr>
<?php
}
}
?>
</table>
</body>
的可能的複製[簡單的PHP分頁](http://stackoverflow.com/questions/3705318/simple-php-pagination ) – Clarkie