[eluser]runrun[/eluser]
If you know how to use this please help me.
This is my form:
Code:
<form id="register_form" method="post">
<table width="543" cellpadding="0" cellspacing="0" id="register_table">
<tr>
<td width="168" class="align_r"><label for="email"><abbr>*</abbr>Emai:</label></td>
<td width="373">
<input type="text" name="email" id="email" value="<?=$this->validation->email?>" />
<span><?=form_error('email')?></span>
</td>
</tr>
<tr>
<td class="align_r"><label for="password"><abbr>*</abbr>Password:</label></td>
<td>
<input type="password" name="password" id="password" value="<?=$this->validation->password?>" />
<?=form_error('password')?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="submit" /></td>
</tr>
</table>
<form>
this is controller:
Code:
$this->load->library('validation');
$rules['email'] = 'trim|required|valid_email';
$rules['password'] = 'trim|required|matches[password_confirm]|min_lenght[5]|md5';
$this->validation->set_rules($rules);
$fields['email'] = 'Email';
$fields['password'] = 'Password';
$this->validation->set_fields($fields);
$data['l']='';
if ($this->validation->run() == FALSE)
{
$this->load->view('register_view',$data);
}
else
{
$this->db->insert('user', $_POST);
redirect('register/register_success');
}
There is no error message when I submit empty form.