sql语句怎么获取 checkbox 值 请说清楚一点,完全看不明白...如果3个checkbox全点了,$aa的值应该是 "||news" 吧... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 但我需要的是 product||member||news需要怎么处理呐 $aa = "||".$_POST["jurisdiction"][$i];改成$aa .= "||".$_POST["jurisdiction"][$i];等于前面有个点号然后$aa=substr($aa,2); ASP获取checkbox后是一个数组,PHP不支持这样的功能,建议在表单中创建一个隐藏域,在提交表单的时候用javascript将所有的checkbox的值赋到这个隐藏域中,PHP直接获取这个隐藏域的值。一组checkbox使用一个隐藏域。 $aa = join("||", $_POST["jurisdiction"]); 唠叨老大的 好像不行?to pandajingjing(pandajingjing) 用JS 赋值可以吗? 如果你要更完整的可以这样$aa = @is_array($_POST['jurisdiction'])? join('||', $_POST['jurisdiction']): $_POST['jurisdiction']; 唠叨老大那个是可以的在处理前你先打印出$_POST['jurisdiction']看是什么!print_r($_POST['jurisdiction']); 到底什么意思?提交完事个数组阿Array ( [jurisdiction] => Array ( [0] => product [1] => member [2] => news ) ) 然后加上for ($i=0;$i<count($_POST["jurisdiction"]);$i++){$aa .= "||".$_POST["jurisdiction"][$i];}echo $aa;?>$aa为||product||member||news$aa=substr($aa,2);后是product||member||news有什么问题吗 .表示继续为这个变量赋值.比如:$a = "i";$a .= "love";$a .= "you";echo $a; //iloveyou 多费劲你,直接foreach数组$jurisdiction执行查询语句不就行了你还要处理成"||".$XXX,然后你再处理这个串,多次一举 用mysqld来启动mysql没有反应 能不能用textarea标签手动给数组里加内容!!!! 怎样获得这样的sql PHP中 imageloadfont 函数 中的字体文件怎么制作啊? 如何将数据库查询的记录集 赋值给表格 谁有全国区县、城市、省份的列表?谢了先! 论坛框架化求救!并全局赋值 资源共享的问题 我想把我的机器虚拟成另一个名字, 请教一个简单的url重写问题 时间的选择 装linux enterprise3 ,没有选择数据库,自行安装了mysql-max-5.0.22-linux-i686,请问
需要怎么处理呐
改成
$aa .= "||".$_POST["jurisdiction"][$i];
等于前面有个点号
然后
$aa=substr($aa,2);
用JS 赋值可以吗?
$aa = @is_array($_POST['jurisdiction'])?
join('||', $_POST['jurisdiction']):
$_POST['jurisdiction'];
在处理前你先打印出$_POST['jurisdiction']看是什么!
print_r($_POST['jurisdiction']);
提交完事个数组阿
Array ( [jurisdiction] => Array ( [0] => product [1] => member [2] => news ) )
然后加上
for ($i=0;$i<count($_POST["jurisdiction"]);$i++)
{
$aa .= "||".$_POST["jurisdiction"][$i];}
echo $aa;
?>
$aa为||product||member||news
$aa=substr($aa,2);后是product||member||news
有什么问题吗
比如:$a = "i";
$a .= "love";
$a .= "you";echo $a; //iloveyou
你还要处理成"||".$XXX,然后你再处理这个串,多次一举