Welcome Guest, Not a member yet? Register   Sign In
direct to specific part of page
#1

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
Reply


Messages In This Thread
direct to specific part of page - by venumurki - 08-26-2015, 03:35 PM
RE: direct to specific part of page - by skoobi - 08-27-2015, 03:44 AM
RE: direct to specific part of page - by jLinux - 08-27-2015, 10:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB