Cara Menampilkan Data Tabel Database Mysql Dengan Fungsi Option

<html>
<table>
<form method=”POST” action=”login.php”>

<tr>
<td>User ID</td><td><select name=’userid’><option value=”-” selected>Silahkan pilih UserID</option>
<?php

include “sambung.php”;

$baca_query = mysql_query(“select * from admin order by userid asc”);
while($d=mysql_fetch_array($baca_query))
{
echo “<option value=$d[userid] selected>$d[userid]</option>”;

}
echo “</select>”;

?>
</td>
</tr>
<tr><td><input type=”submit” name=”login” value=”login”/></td></tr>
</form>
</table>

</html>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>