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>
You have two possibilities:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.