Thursday, February 3, 2011

Re: Login Form not working for noob

Hi Goluhaque,

Login can be a bit complicated. Do you user the authetication component? Which
version of cake do you use?

have you already checked out this pages?

http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_authentication_component_tutorial_-
_administrator_login

http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/

http://bakery.cakephp.org/articles/SeanCallan/2007/04/17/simple-form-
authentication-in-1-2-x-x

Hope that helps. If not come back!


Anja


Am Donnerstag, 3. Februar 2011, um 16:45:00 schrieb goluhaque:
> Hey guys, just started using CakePHP yesterday, so I guess, you may find
> many error in this one. My problem is,
>
>
> function taa_login($password = null) { $this->Session->setFlash('You are at
> the taa-login page.'); if(isset($this->data)){ $this->post->pass =
> $password; if(empty($this->data)) { echo('You gotta enter a proper
> password, nigga.'); } else { $this->Session->setFlash('You are correct.
> Your password is '); $this->redirect(array('action' => 'index')); } } }
>
>
> This was my controller code. I have created the view, here it is
>
> <!-- File: /app/views/posts/taa_login.ctp --> <h1>Login</h1> <?php echo
> $this->Form->create('Post', array('action' => 'taa_login')); echo $this
> ->Form->input('password'); echo $this->Form->end('Login'); ?>
>
>
> My problem is that I don't know how to handle the variables from that form.
> For example, the password thing, how do I handle that in my controller?
> Also, there is one another thing I can't understand, where do I check
> whether the password supplied is right or not, the model or the controller?

--
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: