[eluser]alrightythen[/eluser]
[quote author="tatewaky" date="1258147803"][quote author="alrightythen" date="1258147548"]does it have to be a button? you can add an anchor() in the form and restyle the button and anchor to look the same.
something like this.. echo anchor('email/register', 'Register!, array('id' => 'registerbutton'))[/quote]
Does the anchor support the form submit???, i mean, when the user clicks on the anchor, and i get to register method, am i going to be able to work with the form validation class???[/quote]
hmm I guess not.
Maybe you could do this..
in your view page
Code:
echo form_open('email/send');
echo form_submit('go', 'login');
echo form_submit('go', 'register');
in your controller
Code:
if($_POST['go']=="login") {
$data = array(
'login' => $_POST['login'],
'pw' => $_POST['pw']
);
$this->users_model->login($data);
}
if($_POST['go']=="register") {
$data = array(
'login' => $_POST['login'],
'pw' => $_POST['pw'],
'date_registered' => date()
);
$this->user_model->add_member($data);
}