我的代碼似乎沒有工作..單選按鈕出現,但沒有在他們旁邊..它似乎像mysql_fetch_array不工作的原因,因爲我已經玩了代碼,並反覆測試它找到代碼似乎遇到問題的地方,並停止工作..可有人請告知什麼是錯的?歡呼ps。我是新手,最近幾天才完成了關於w3schools的php教程。PHP回聲不起作用
<body>
<?php
include 'dbyear2.php';
$qnumber = $_REQUEST['uqn']; // obtain question number from URL
$find = mysql_query("SELECT * FROM Renal WHERE UQN='$qnumber'");
while($retrieve=mysql_fetch_array($find));
{
$retrieve['question'] = $question;
$retrieve['MCQ_A'] = $a;
$retrieve['MCQ_B'] = $b;
$retrieve['MCQ_C'] = $c;
$retrieve['MCQ_D'] = $d;
$retrieve['MCQ_E'] = $e;
$retrieve['answer'] = $answer;
$retrieve['MCQ_correct'] = $correct;
}
?>
<form action='check.php' method='POST'>
<table>
<tr><td></td><td></td></tr>
<tr></tr>
<tr><td><input type='radio' name='group1' value='A' /></td><td> <?php echo $a; ?></td></tr>
<tr><td><input type='radio' name='group1' value='B' /></td><td> <?php echo $b; ?></td></tr>
<tr><td><input type='radio' name='group1' value='C' /></td><td> <?php echo $c; ?></td></tr>
<tr><td><input type='radio' name='group1' value='D' /></td><td> <?php echo $d; ?></td></tr>
<tr><td><input type='radio' name='group1' value='E' /></td><td> <?php echo $e; ?></td></tr>
<tr>
<?php
// sending the retrieved information from MYSQL via POST for use in check.php file
$qnumber;
$a;
$b;
$c;
$d;
$e;
$answer;
$correct;
?></tr>
<tr><td><input type="submit" value="Submit"></td></tr>
</table>
</form>
</body>
</html>
我改變了這一點,但它仍然無法正常工作。任何其他建議? – MFA 2013-02-15 11:52:58