Friday, March 27, 2009

Re: incorrect action attribute when creating a form

Since when is a that necessary? Is this something specific for vhost
setups like "/~username/some_dir/..."?

On Fri, Mar 27, 2009 at 6:14 AM, dr. Hannibal Lecter
<lecterror@gmail.com> wrote:
>
> Url is missing:
>
> <?php echo $form->create('User', array('url' => array('action' =>
> 'login')));?>
>
> On Mar 25, 9: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: