我希望能够通过 $_SESSION 标签将所选主题的值发送到另一个页面,但它总是获取数据库中最后一个数据的值
$sqltpc = "SELECT * FROM forum_question";
$resulttpc = mysql_query($sqltpc) or die('Error: '.mysql_error());
while($linetpc = mysql_fetch_array($resulttpc, MYSQL_ASSOC)){
echo "
<tr id='trow' class='right'><input type='hidden' name='hidden' value=".$linetpc['id']." />
<td><img src='Images/logosmallforum.png' /><a href='lentech_topic.php'>".$linetpc['id']." ".$linetpc['topic']."</a></td>
<td><a href='#'>".$linetpc['username']."</a></td>
<td><a href='#'>".$linetpc['view']."</a></td>
<td><a href='#'>".$linetpc['reply']."</a></td>
</tr>";
}
$viewtpc = $_POST['hidden'];
$_SESSION['idset'] = $viewtpc;