作者ntouckcm (知足常乐)
看板PHP
标题[请益] 复选钮怎麽传参数
时间Fri May 9 10:41:18 2008
请问一下
复选钮该如何传参数
test1.php
<form method="POST" action="test1.php">
<input name=\"gene_name[]\" type=\"checkbox\" value=\"$allname[0]\"
checked=\"checked\"/><font face=\"Times New Roman\" size=\"4\">
$allname[0]</a></font>";
<input name=\"gene_name[]\" type=\"checkbox\" value=\"$allname[1]\"/>
<font face=\"Times New Roman\" size=\"4\">$allname[1]</a></font>";
.............
<embed src="svg.php?start_location=<?=$start_location;?>&end_location=
<?=$end_location;?>&name=<?=$gene_name;?>" width="1300" height="1400"
type='image/svg+xml' pluginspage='
http://www.adobe.com/svg/viewer/install/' />
svg.php
$select_name=$_GET['name']; 但是$select_name印出来是Array
若用$select_name=$_POST['name']; 印出来没有东西
请问一下有没有什麽方式可以传复选选单的参数呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.121.219.142
1F:→ gamewolf:你 print_r($_POST['gene_name']) 看看 05/09 10:53
2F:→ ntouckcm:我在svg.php里 05/09 13:22
3F:→ ntouckcm:$select_name = print_r($_POST['gene_name']); 05/09 13:23
4F:→ ntouckcm:但只看到 第0个元素 05/09 13:23
5F:→ ntouckcm:把 $select_name 印出来只看到第0个元素 05/09 13:25
6F:→ aaroms:$s = $_POST['gene_name'];$s[0];$s[1]...$s[n]; 05/09 15:36
7F:推 dspswen:推楼上 05/14 14:56