Friday, March 27, 2009

Re: incorrect action attribute when creating a form

<?php echo $form->create('User',array('action'=>'login'));?>
<?php echo $form->input('username');?>
<?php echo $form->input('password',array('type'=>'password'));?>
<?php echo $form->end('Login');?>

thats my login form ....works just fine!

On Mar 25, 4:52 pm, jonas <jonas.subscripti...@gmail.com> wrote:
> When I create a form there goes something wrong when the action
> attribute of the form element is created.
>
> View code:
>
>     <?php echo $form->create('User', array('action' => 'login'));?>
>         <?php echo $form->input('username');?>
>         <?php echo $form->input('password');?>
>         <?php echo $form->submit('Login');?>
>     <?php echo $form->end(); ?>
>
> Outputs:
>
> <form id="UserLoginForm" method="post" action="/~jonas/cake-template/
> index.php/users/users/login"> ...
>
> Clearly this should have been action="/~jonas/cake-template/index.php/
> users/login" !
>
> Why is this happenings ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

No comments: