|
public function erp($page = 'erp')
{
if( ! file_exists('application/views/index_cn/'.$page.'.php'))
{
show_404();
}
$this->load->helper('form');
$this->load->library('form_validation');
$data['title'] = ucfirst('Tradestar LLC Erp');
$this->form_validation->set_rules('userid','用户名','required');
$this->form_validation->set_rules('password','密码','required');
if($this->form_validation->run() == FALSE)
{
$this->load->view('templates/header',$data);
$this->load->view('templates/nav_cn',$data);
$this->load->view('index_cn/'.$page,$data);
$this->load->view('templates/footer',$data);
}else{
$this->load->view('index_cn/success');
}
}
/////////form
<?php echo validation_errors(); ?>
<?php echo form_open('erp_login'); ?>
用户名:<input type="text" name="userid"><br>
密码:<input type="password" name="password"><br>
<input type="submit" value="提交">
</form>
input里错误无法echo出来,。 |
|