isPost()
on 2.0+ is:
-- is('post')
Cya,
--
Thiago Belem
Desenvolvedor
Rio de Janeiro - RJ - Brasil
+55 (21) 8865.9250
thiagobelem.net
contato@thiagobelem.net
Skype / gTalk » thiago.belem.web
LinkedIn » br.linkedin.com/in/thiagobelem/pt
Assando Sites, curso de CakePHP » assando-sites.com.br
Thiago Belem
Desenvolvedor
Rio de Janeiro - RJ - Brasil
+55 (21) 8865.9250
thiagobelem.net
contato@thiagobelem.net
Skype / gTalk » thiago.belem.web
LinkedIn » br.linkedin.com/in/thiagobelem/pt
Assando Sites, curso de CakePHP » assando-sites.com.br
2012/2/6 dreamingmind <dreamingmind.8@gmail.com>
Is that supposed to be isPost() ?
http://book.cakephp.org/1.3/en/view/1293/Request-Type-Detection
Don
On Feb 5, 4:22 pm, Fernando Nery Filho <fnfi...@gmail.com> wrote:
> Hello everyone!
>
> I'm having some trouble with the $this->request->is('post') object and
> hope I can get some answers here...
>
> In my controller I have the following:
>
> public function movie($action = "list", $id = "") {
> if ($action == "single") {
> if ($this->request->is('post')) {
> // Saves the record
> } elseif ($id != "") {
> // Load record info
> } else {
> // Load blank form
> }
>
> // Load other informations...
>
> $this->render('movie');
> }
>
> }
>
> When i load a blank form at admin/movie/single and try to submit the
> form it works just fine and my record is saved.
> But, when i load a record using admin/filme/single/1 and try to update
> it, $this->request->is('post') returns false, and nothing happens...
>
> What am I doing wrong here?
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment