我有這樣的代碼:下拉菜單
<?php
session_start();
include_once 'include/dbconnect.php';
if(!isset($_SESSION['user']))
{
header("Location: ../index.php");
}
$dropdown = mysql_query("SELECT * FROM carros_real WHERE real_dono='".$_SESSION['user']."'");
while ($drop_row = mysql_fetch_array($dropdown)){
echo "<select>";
echo "<option value='".$drop_row['real_id']."'>" . $drop_row['real_marca'] . "</option>";
echo "</select>";
}
?>
的結果是這樣的: http://prntscr.com/9d1vpg
清楚我打算做其oposite ...我需要所有列表汽車,我想發送$ drop_row ['real_id']到$ var。 我在這裏錯過了什麼? 感謝
移動你的'出while循環側 – cmorrissey
謝謝...但是...你可以請做一個例子嗎? –