麻烦高手帮我看看我哪里错了。。

浪子5200 2015-04-26 01:36:09
<td input name="zaod1" type="hidden" value="<?php echo $myrow_lim47_1['title'];?>"> <!---这里的下拉框可以显示数据库中的内容--->
<select name="zaod1">
<option><?php echo $myrow_lim47_1['title'];?></option>
<?php
$result47=mysql_query("SELECT * FROM st where cid = 47");
while($row1 = mysql_fetch_array($result47))
{
echo "<option>$row1[title]</option>";
}
?>

</select> </td>

<td input name="zaod2" type="hidden" value="<?php echo $myrow_lim47_2['title'];?>"> <!--而这里无法显示数据库内容---->
<select name="zaod2">
<option><?php echo $myrow_lim47_2['title'];?></option>
<?php
$result47=mysql_query("SELECT * FROM st where cid = 47");
while($row1 = mysql_fetch_array($result47))
{
echo "<option>$row1[title]</option>";
}
?>

</select> </td>
...全文
96 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
猪崽儿0o0 2015-04-26
  • 打赏
  • 举报
回复
多级联动建议还是采用ajax去实现比较稳妥,你这个治标不治本啊。
浪子5200 2015-04-26
  • 打赏
  • 举报
回复
引用 1 楼 xuzuning 的回复:
没有看到 $myrow_lim47_2 是在哪里赋值的
在上面赋值的 $se_pos47_1=rand(0, $max_num47-1); $length=1; $result_lim47_1=mysql_query("select * from st where cid = 47 limit $se_pos47_1,$length"); $myrow_lim47_1=mysql_fetch_array($result_lim47_1); $se_pos47_2=rand(0, $max_num47-1); $length=1; $result_lim47_2=mysql_query("select * from st where cid = 47 limit $se_pos47_2,$length"); $myrow_lim47_2=mysql_fetch_array($result_lim47_2); $se_pos47_3=rand(0, $max_num47-1); $length=1; $result_lim47_3=mysql_query("select * from st where cid = 47 limit $se_pos47_3,$length"); $myrow_lim47_3=mysql_fetch_array($result_lim47_3); $se_pos47_4=rand(0, $max_num47-1); $length=1; $result_lim47_4=mysql_query("select * from st where cid = 47 limit $se_pos47_4,$length"); $myrow_lim47_4=mysql_fetch_array($result_lim47_4); $se_pos47_5=rand(0, $max_num47-1); $length=1; $result_lim47_5=mysql_query("select * from st where cid = 47 limit $se_pos47_5,$length"); $myrow_lim47_5=mysql_fetch_array($result_lim47_5); $se_pos47_6=rand(0, $max_num47-1); $length=1; $result_lim47_6=mysql_query("select * from st where cid = 47 limit $se_pos47_6,$length"); $myrow_lim47_6=mysql_fetch_array($result_lim47_6); $se_pos47_7=rand(0, $max_num47-1); $length=1; $result_lim47_7=mysql_query("select * from st where cid = 47 limit $se_pos47_7,$length"); $myrow_lim47_7=mysql_fetch_array($result_lim47_7);
浪子5200 2015-04-26
  • 打赏
  • 举报
回复
发现如果我重新定义 $result47=mysql_query("SELECT * FROM st where cid = 47");可以读取 不过好像太麻烦了。。。有别的方法吗?
xuzuning 2015-04-26
  • 打赏
  • 举报
回复
没有看到 $myrow_lim47_2 是在哪里赋值的

21,873

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧