smarty中获取option选项的值
smarty中获取option选项的值html代码:<form action="team_join_new1.php" method="post">
<div class="tjnMuluDiv">
<div class="tjnMuluBox">
<div class="list_Fa">
<select name="optt" multiple="multiple" id="select1" style="width:200px;height:160px"
>
<!--{foreach item=firsts from=$first}-->
<option value="{$firsts.id}">{$firsts.in_name}</option>
<!-- {/foreach} -->
</select>
<input name="optt" type="hidden" value=""id="optt" name="optt"/>
</div>
<div class="list_Fa">
<select multiple="multiple" id="select2" style="width:200px;height:160px"
name="class"
>
<!-- {foreach item=seconds from=$second} -->
<option value="{$seconds.id}">{$seconds.in_name}</option>
<!-- {/foreach} -->
</select>
</div>
<div class="list_Fa">
<select multiple="multiple" id="select3" style="width:200px;height:160px"></select>
</div> <span id="select4" style="border:#F00"> </span>
</div>
</div>
<div class="topBtnDiv4"><input type="submit" name="button" id="baocun" value="下一步" /></div>
</form>
php中:<?php
require_once(dirname(__FILE__)."/../../".'inc/init.php');
$userid=$_SESSION['userid'];
/*
* 获取主目录数据
* */
$sql="select * from gp_industry where class=1";
$arr=array();
$arr=$db->getAll($sql);
$smarty->assign("first",$arr);
echo $_POST['optt'];
$smarty->display("team/team_join_new1.html");
?>
没有输出结果,求解释!!! LZ,这个问题原始的提出者是我,现在我回答一下你,form表单只要跳转到下一个页面就能获取到了,但如果跳转到原来表单就无法获取的了。 LZ,这个问题原始的提出者是我,现在我回答一下你,form表单只要跳转到下一个页面就能获取到了,但如果跳转 ...
路边拾草人 发表于 2011-06-25 18:53 http://bbs.chinaunix.net/images/common/back.gif
原因是什么?
页:
[1]