我有一个名为 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>
...
我想知道的是,像这个网站:http ://www.gameonline.org 我想在点击类别时更改每个页面的信息。我怎么做?
谢谢
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);
while ($row_Recordset1 = mysql_fetch_assoc($Recordset1))
{
echo '<a href="link_categoria.php?cat='.
$row_Recordset1['idcateg'] .'">'.
$row_Recordset1['descri']. '</a><br>';
}