首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >访问表单值- Cakephp

访问表单值- Cakephp
EN

Stack Overflow用户
提问于 2013-02-26 18:38:55
回答 1查看 2.9K关注 0票数 0

大家好,我有一个表单在cakephp .i必须访问用户输入的值后点击submit.In我的表单下面,点击sumbit我在我的控制器部分存储值,在那里我使用回显$-POST‘.Can’来显示用户输入的名称,但它没有显示.Can任何帮助?注:Cakephp-2.3

代码语言:javascript
复制
    <h1>Add Comment</h1>
       <?php
       $post_id= $posts['Post']['id']; 
        echo $this->Form->create('Comment',array('action' => 'comment','url' =>    
        array($post_id,$flag)));
        echo $this->Form->input('name');
       echo $this->Form->input('email');
       echo $this->Form->input('text', array('rows' => '3'));
       echo "Enter Captcha Code:    ";   
       echo $this->Html->image(
        array('controller' => 'posts', 'action' => 'captcha'));
        echo $this->Form->input('code');
       echo $this->Form->end('Add comment'); 
     ?>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-02-26 18:48:36

这一切都在文档的Blog tutorial中进行了解释。

当用户使用表单将数据发送到您的应用程序时,该信息可以在$

->request-> data中获得。如果您想要查看它的外观,可以使用pr()或debug()函数将其打印出来。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15086924

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档