此代码从mysql中的表中获取值 我需要帮助来编辑此代码,以通过从mysql表中选择的2个菜单进行搜索。 如: 查看类别1中的所有值 然后选择第二个,从category1和category2获取共享的值
echo"<br><form method='post' action='edit.php?action=show1play&&cats=$catid' name=\"play_in_cat\">";
echo"<select name ='catid' onchange=\"var catid=this.options[this.selectedIndex].value; document.play_in_cat.submit();\">";
$w=mysql_query("select * from cat where catid='$catid' order by ratteb asc");
while($row=mysql_fetch_row($w))
{
$namex=$row[1];
}
echo"<option value=''>$name....</option>";
echo"<option value='$catid'>$namex</option>";
$e=mysql_query("select * from cat where parentcatid='$catid' order by ratteb asc");
while($row=mysql_fetch_array($e)){
if($row[11]==5)
{
}
else
{
echo"<option value='$row[0]'>$namex>>$row[1] </option>";
$ee=mysql_query("select * from cat where parentcatid='$row[0]' order by ratteb asc");
while($row1=mysql_fetch_array($ee)){
echo"<option value='$row1[0]'>$namex>>$row[1]>>$row1[1]</option>";
$ee2=mysql_query("select * from cat where parentcatid='$row1[0]' order by ratteb asc");
while($row2=mysql_fetch_array($ee2)){
echo"<option value='$row2[0]'>$namex>>$row[1]>>$row1[1]>>$row2[1]</option>";
$ee3=mysql_query("select * from cat where parentcatid='$row2[0]' order by ratteb asc");
while($row3=mysql_fetch_array($ee3)){
echo"<option value='$row3[0]'>$namex>>$row[1]>>$row1[1]>>$row2[1]>>$row3[1]</option>";
}
}
}
}
}
echo"</select>";