我想知道如何在我的 .php 文件中使用 GET 方法:forumdocument.php 来获取在 table.php 中单击的 href 的 ID
我希望这是开始它的正确方法:
'<a class="formtitellink" href="forumdocument.php" id="$row['ID']">' . $row['Titel'] . '</a>' . "</td>";
表.php:
$query = "Select *
from forum";
$resultaat = mysql_query($query, $connectie);
echo "<table border='1'>
<tr>
<th>ID</th>
<th>Tijd</th>
<th>Gebruikersnaam</th>
<th>Titel</th>
</tr>";
while($row = mysql_fetch_array($resultaat))
{
$_SESSION['row'] = $row;
echo "<tr>";
echo "<td>" . $row['Tijd'] . "</td>";
echo "<td>" . $row['Gebruikersnaam'] . "</td>";
echo "<td>" . '<a class="formtitellink" href="forumdocument.php" id="$row['ID']">' . $row['Titel'] . '</a>' . "</td>";
echo "</tr>";
}
echo "</table>";