【发布时间】:2017-07-13 01:40:43
【问题描述】:
我有一个通过 PHP 从 mysql 数据库表中填充的 HTML 表,其中包含 8 个不同的值。 我需要打开第二个页面并将我单击的值中的任何一个传递给它,以便从数据库中查询另一个。 到目前为止,我可以通过 href 打开第二页,但我可以解决参数问题。 谁能帮我解决这个问题?
代码:
<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 html url html-table href