Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dropdown list with php

5 views
Skip to first unread message

amrita gs

unread,
Jun 3, 2011, 5:15:35 AM6/3/11
to
<?php
include("connection.php");
$sdb="show databases";
$q=mysql_query($sdb);
$options="";
?>
<html>
<body>
<form name="form1" method="post" action="selectdb2.php">
<SELECT NAME=DB>
<option value="0">Choose</option>
<option value="1">
<?php
while($r=mysql_fetch_array($q))
{
$options=$r['Database'];
echo $options;
}
?>
</option>
</SELECT>
</form>
</body>
</html>

For this code am getting output as Choose and the name of all
databases in a single line.


Can anyone help?????

0 new messages