我有一个名为 categoria 的表,有 10 行:
(idcateg, descri) VALUES
(1, 'Action'),
(2, 'Classic'),
(3, 'Fight'),
(4, 'Others'),
(5, 'Puzzles'),
(6, 'Racing'),
(7, 'Shooting'),
(8, 'Sports'),
(9, 'Tower Defense'),
(10, 'Zombie');
它都链接到一个名为 link_categoria.php 的页面
<a href="link_categoria.php?cat=1">Action</a>
<a href="link_categoria.php?cat=2">Classic</a>
<a href="link_categoria.php?cat=3">Fight</a>
<a href="link_categoria.php?cat=4">Others</a>
...
我想知道的是,我怎样才能访问这些页面,所以我可以编辑每个页面,因为当我点击它们时,它会显示相同的结果,它的链接如下:
mysql_select_db($database_gameconnection, $gameconnection);
$query_Recordset1 = "SELECT * FROM categoria ORDER BY categoria.descri";
$Recordset1 = mysql_query($query_Recordset1, $gameconnection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
echo "Click a link and you will see all the games in the same categoria!<br><br>";
while ($row_Recordset1 = mysql_fetch_assoc($Recordset1))
{
echo '<a href="link_categoria.php?cat='.
$row_Recordset1['idcateg'] .'">'.
$row_Recordset1['descri']. '</a><br>';
}
我希望能够编辑每个类别的内容。