Reputation: 79
I am declared two select. once i select value in first select then i will fetch value in second select.
<?php
$result1 = mysql_query("SELECT row1 FROM information");?>
<select id='select1'>
<?php
while($row=mysql_fetch_array($result1))
{
if($row['row1']!=NULL)
{
echo "<option value='$row[row1]'>$row[row1]</option>";
}
}?>
</select><br/><br/>
<?php
//*******************************************
$result1 = mysql_query("SELECT column1 FROM information");
echo "<select id='select2'>";
while($row=mysql_fetch_array($result1))
{
if($row['column1']!=NULL)
{
echo "<option value='$row[column1]'>$row[column1]</option>";
}
}?>
</select>
Upvotes: 0
Views: 354
Reputation: 740
You have two possibilities:
Upvotes: 1