Sunday, October 31, 2010

Re: need help with form

On Sun, Oct 31, 2010 at 5:48 PM, Briko03 <nathanrlarkin@gmail.com> wrote:
> Here is my view:
>
> <?php
> echo $form->create('Result', array('action' => 'findperson'));
> echo $form->input('lname');
> echo $form->input('fname');
>
> echo $form->submit();
> echo $form->end();
> ?>
>
>
> Here is the action:
>
> function findperson()
>           {
>                if (!empty($this->data)) {
>                        $this->redirect(array('action' => 'person'));
>                        }
>                }
>        //I want to append this to the redirect - $this->data['Result']
> ['lname']
>
> I am kind of stuck at the moment and not sure what I am doing
> wrong....

Don't redirect as that creates an entirely new request. You could use
setAction() instead.

But I think you need to ask yourself whether this is really the best
way to do this. findPerson() doesn't seem to do a lot of finding at
all. So why bother? Couldn't you simply go directly to person()?


> Right now when i click submit i just get a blank white screen.

Probably a fatal error. Set debug to 2 and/or check your server log.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate