Retrieve data from layout


I’d would like to ask an easy and fast question because I’ve been searching for 2 days now and can’t find a solution.

If I have a form in the layout/main.php (login form), how and where can I process its data?


I mean, as you can see there is the attribute action="/prova/index.php/login" because I would like to capture an process the data in my LoginController, but I print POST ( print_r($_POST); ) and its empty.

Any help would be appreciated.

Thanks in advance.

It’s because you have no name attributes into inputs.

<form action="/prova/index.php/login" method="POST" name="LoginForm">

<input class="input-small" type="text" placeholder="Email" name="Email">

<input class="input-small" type="password" placeholder="Password" name="Password">

<button class="btn" type="submit">Login</button>


/* moved - not specific to Yii */