解决方案 »

  1.   

    $post['txt_Name'] = $tel;
    $tel在哪里定义的?你的框架是直接post后就可以使用该变量了么?$post = $this->input->post(NULL, TRUE);
    打印¥post的值是什么
      

  2.   



    public function _FeedBack(){
    $post = $this->input->post(NULL, TRUE);
    if(isset($post['btnSubmit'])){
     $post['addtime'] = time();
     $this->message->insert($post);
    }
    }<form action="{site_url('message')}" method="post"   name="form1" >
    <input name="tel" type="text" class="px"  id="tel" value="" >
    <a id="showcard1" class="submit" href="javascript:void(0)" onClick="document.getElementById('btnSubmit').click()">提交留言</a>
    <input type="submit" name="btnSubmit" value="btnSubmit" onClick="return CheckData();" id="btnSubmit" style="display:none" /></form>以前是这样的  这样可以获取到值   但是想改成上面那样 就获取不到值了
      

  3.   

    <form action="{site_url('message')}" method="post"   name="form1" >
    <input name="tel" type="text" class="px"  id="tel" value="" >
    <a id="showcard1" class="submit" href="javascript:void(0)" onClick="document.getElementById('btnSubmit').click()">提交留言</a>
    <input type="submit" name="btnSubmit" value="btnSubmit" onClick="return CheckData();" id="btnSubmit" style="display:none" /></form>
    用这个