大家好,我有一个表单在cakephp .i必须访问用户输入的值后点击submit.In我的表单下面,点击sumbit我在我的控制器部分存储值,在那里我使用回显$-POST‘.Can’来显示用户输入的名称,但它没有显示.Can任何帮助?注:Cakephp-2.3
<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');
?>发布于 2013-02-26 18:48:36
这一切都在文档的Blog tutorial中进行了解释。
当用户使用表单将数据发送到您的应用程序时,该信息可以在$
->request-> data中获得。如果您想要查看它的外观,可以使用pr()或debug()函数将其打印出来。
https://stackoverflow.com/questions/15086924
复制相似问题