Hello everyone... i am new to code igniter.
controller code:
public function confirm()
{
$this->load->library('form_validation');
$this->load->model('db_model');
$this->form_validation->set_rules('mem_name', 'Member Name', 'trim');
$this->form_validation->set_rules('mem_no', 'Membership No.', 'trim|required');
$this->form_validation->set_rules('mem_tel', 'Contact No.', 'trim|required');
$this->form_validation->set_rules('mem_email', 'Email', 'trim|valid_email');
//$this->form_validation->set_rules('order_quantity', 'Promo Code', 'trim|required');
if($this->form_validation->run() == false){
$lang = (isset($_GET['lang']))? (($_GET['lang']=='1')?'1':'2') :'1';
$data['title'] = $this->lang->line('wtmemberstore');
$data['main_content'] = 'view-wtmemberstore_order.php#signupform';
$data['lang'] = $lang;
$this->load->view('includes/template', $data);
}else{
$email = $this->input->post('mem_email');
$this->mailto();
redirect(base_url().'wtmemberstore/success');
}
}
when the form validation returns false "wtmemberstore_order" page loads up. But the form is at the bottom of the page. I want the bottom part of the page to be loaded when form validation is false.
Please help me...thanks in advance