Do you have two (html) forms on the page, each with a different action and a 
submit button? If so, they should go to different places (one to users/login 
and the other to users/register, I would have thought). If you have but they 
are going to the same place, then make sure each form has a different action:

echo $this->Form->create('User', array('action' => 'login'));
echo $this->Form->create('User', array('action' => 'register'));

If you have built it with just a single form (probably not the best route here) 
you ought to have two submit buttons (login and register) so that the user 
knows what to do. Give each submit button a 'name' attribute and then check 
$this->params['form'] in your controller action. In there you should find a key 
for the submit button that was clicked:

if (isset($this->params['form']['login'])) ...then do the login

Jeremy Burns
Class Outfit

[email protected]
http://www.classoutfit.com

On 15 Sep 2010, at 04:18, andrewperk wrote:

> Hello,
> 
> I'm having trouble with my login and register forms being on the same
> page. When I try to login on my index page where both forms are
> displayed at once it says my username and password are incorrect after
> redirecting me to the actual login view page where I display only the
> login form. If I try to login on that page it lets me login just fine.
> 
> The problem only occurs when I try to login from the page that
> displays both forms at once, I've never had this problem before.
> 
> Does anyone have any clue what could be causing this? I'd appreciate
> any help. Thanks.
> 
> Andrew
> 
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to