1个回答
2013-08-26
展开全部
<?php mysql_connect("localhost","root","123"); mysql_select_db("ceshi"); ?><script language = "JavaScript"> var onecount; onecount=0; subcat = new Array(); <?php $sql = "select * from news_sclass"; $result = mysql_query($sql); $count = 0; while($res = mysql_fetch_row($result)) echo "onecount=$count;"; ?> //联动函数 function changelocation(locationid) } } </script> <form method="post" name="myform" action="1.php"> <select name="type" onChange="changelocation(document.myform.type.options[document.myform.type.selectedIndex].value)" size="1"> <option selected value="">main</option> <?php $sql = "select * from news_bclass"; $result = mysql_query($sql); while($res = mysql_fetch_row($result)) ?> </select> <select name="ctype"> <option selected value="">sub</option> </select> <input type="submit" name="Submit" value="search"> </form> 数据库ceshi,news_sclass 有三个字段小类表名ID 小类名 大类名news_bclass大类表 有两个字段ID 大类名 希望我的答案令你满意
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询