這是我的代碼的多個值,使用表upload-data
,login
,paper
下拉僅示出了單個值我在我的數據庫
<!doctype html>
<html><head><meta charset="utf-8">
<title>Untitled Document</title>
</head><body>
<table border="3"><tr>
<th>Paper id</th>
<th>Paper Name</th>
<th>Reviewer Name</th>
<th>Paper Status</th>
</tr>
<?php $con=mysql_connect("localhost","root","");
mysql_select_db("conferencedb");
$qry="select paperid,papername from paper";
$rs=mysql_query($qry);
$qry1="select (`username`) from login where type='reviewer'";
$rs1=mysql_query($qry1);
while($row=mysql_fetch_row($rs))
{
if($row1=mysql_fetch_row($rs1))
{
echo "<tr>";
echo "<td>$row[0]</td>";
echo "<td>$row[1]</td>";
echo "<td><select name='type'>
只有單個選項可以從上面
<option value='$row1[0]'>$row1[0]</option>
</select></td>";
echo "<td>Pending</td>";
echo "</tr>";
}
}
?>
</table>
<input type="submit">
</body>
</html>
數據庫獲取代碼正在工作,但它只從數據庫中檢索單行:$row1[0];
當前輸出窗口...我只用 塗料標記區域。
相反的,如果($ ROW1 =和mysql_fetch_row($ RS1))使用,而($ ROW1 =和mysql_fetch_row($ RS1)) – 2014-09-04 12:01:03
paperid和papername是相同的所有表當我添加上面的代碼..沒有改變下拉列表 – 2014-09-04 12:07:25
$行和$ row1有多少記錄? – 2014-09-04 12:16:46