选择选项php后显示数据

时间:2015-05-12 08:33:58

标签: php

选择

之一后,如何显示详细信息

以下是代码:

<td><p>ID Vendor	:</p></td> <td> <select>
		<?php
$host = "localhost";
$username = "root";
$password = "";
$database = "dbPO";
$conn=mysql_connect($host,$username, $password);
$pilihdatabase= mysql_select_db($database, $conn)
or die ("Connect Failed !! : ".mysql_error());
        $query = mysql_query("SELECT IDVendor FROM tblVendor");
        while ($row = mysql_fetch_array($query)) {
            $IDVendor = $row['IDVendor'];
            $NamaVendor = $row['NamaVendor'];
            echo "<option>". $IDVendor ."</option>";
           }
        ?>
    </select> </td> <td><input type="text" name="NamaVendor" size="50"/></td>

请帮忙

0 个答案:

没有答案