php 提交表单技巧

<input type=text name=inquiry['name']>
<input type=text name=inquiry['sex']>
<input type=text name=date['Y']>
<input type=text name=date['M']>
<input type=text name=date['D']>


php 服务端代码

$arrstr=array();
foreach($_POST['inquiry'] as $key=>$value){
     //mysql
     arrstr[key] = $value;
}

$s = '';
function(div){
    s+='keywords[]='+$(div).val()+'&';}
);

你可能感兴趣的:(php 表单提交)