-1
I’m starting to use codeigniter, and I have a question.
In the view, I have 2 presses, one for login and one for registration:
<form id="login" method="post">
<legend>Login</legend>
<p><label>email:</label> <input type="email"/></p>
<p><label>senha:</label> <input type="password"/></p>
<p><label>enviar</label> <input type="submit"/></p>
</form>
<form id="cadastro" method="post">
<legend>Cadastro</legend>
<p><label>nome:</label> <input type="text"/></p>
<p><label>email:</label> <input type="email"/></p>
<p><label>senha:</label> <input type="password"/></p>
<p><label>Repita a senha:</label> <input type="password"/></p>
<p><label>enviar</label> <input type="submit"/></p>
</form>
And in the controller, I have the two methods, login and registration
public function login(){
echo 'chamou login';
}
public function cadastro(){
echo 'chamou cadastro';
}
But I don’t know how to call the right methods, IE, login when I fill in the login and registration fields when I fill in the registration fields. Can someone help me?