This is probably my second question regarding authentication. But i am still not able to authenticate my login-form..Hence i have decided to post my code again.
So can anyone please tell me how the authentication is done ????
//this is my index page, where a user logs in
<div align="center">
<h2> ONLINE LIBRARY SYSTEM </h2>
<h4> If you have already registered into our library system . Please Login below </h4?
<br />
</div>
<div class="form">
<fieldset>
<?php
echo $this->Form->create('Member');
echo $this->Form->input('username');
echo $this->Form->input('password');
echo $this->Form->end('Login');
?>
<h4> If not registerd. Register here <?php echo $this->Html->link('Register Now',array('controller'=>'members','action'=>'register')); ?> </h4>
</fieldset>
</div>
And what do i need to mention in my index function ??
function index()
{
}
And where exactly i must write/call the Auth component….???
Can anyone please explain me…And Please dont post the link of cookbook…i read it almost 4 times and have nt understood perfectly
The index function is generally called, when the user invokes the controller, without specifying an action. Eg:
http://localhost/cake/<some-controller>. Hence what goes into the index() function, depends, on what you want to display, if the user has not specified a specific action, such as
http://localhost/cake/<some-controller>/<some-action>(eg.http://localhost/cake/library/show_book.As a practice, most developers put the above code (login stuff) into
login()function.The following is some additional information, that you can read up on, wrt to getting the authentication working:
Authentication scheme.