POST获取的数组为空,求教

浏览:1320 发布日期:2016/06/01 分类:求助交流 关键字: post为空
网页提交过来的post数据无法获取,打印出来是空,网上找了也没找到具体原因,求教大神;代码如下:

html部分: <form  action="{:U('Order/add_name')}" method="post" target="_parent">
 <input type="text" name="tname"  placeholder="输入你的姓名" value="">
 <input type="email" name="email"  placeholder="请输入你的邮箱" value="">
 <button type="submit">立即提交</button>
</form>
PHP部分:public function add_name(){
        
        if(IS_POST){
            $dd = I('post.');
            dump($dd);
        }

             if(!$dd['tname']){
            $this->error('请输入姓名!');
        } 
        if(!$dd['email']){
            $this->error('请输入邮箱!');
        } else {
            $list = M('namelist')->where(array('tmail'=>$dd['email']))->find();
            if($list){
                $this->redirect($order_url);
            }
        }

最佳答案
评论( 相关
后面还有条评论,点击查看>>