我正在尝试从查询中获取名称并通过GET方法传递每个名称,因此当点击"回答"排名,它将打开一个子窗口,我可以在其中找出哪个用户以及他评估了答案的值。
while($row = mysql_fetch_array($result))
{
echo "<div class='answer'>"
.$row['User']." has answered:
<dl>
<dd>".$row['Answer']."</dd>"; ?>
<dd>
<form method='GET' action='votes.php' >
<input type="hidden" name="x" value="<?php echo $row['Answer'];?>"/>
<input type='submit'/>
</form>
<a onclick="javascript:popUp()" >
Rank: <?php echo $row['k'];?>
</a>
问题是当我试图在votes.php中获得查询的答案时,它说$_GET['x']
未定义?
if(isset($_SESSION['email'])){
if(isset($_GET['x'])){
$ans = $_GET['x'];
$query = "SELECT User, AES_DECRYPT(Vote,'usa') as l
FROM voting
WHERE Answer = '$ans'";
&#13;
提前致谢