Welcome Guest, Not a member yet? Register   Sign In
Functions Do Not Load Correctly?

I am witting out an application and working on a multi page registration form. And when the 1st registration page loads with my template/theme correctly. Then when you load the user verification that dispatches an email with a link to click and verify the account and to continue the template/themes do not load and just loads the text that is generated from the system to populate the template/theme.

the first form function

function NewUserFormA()

        $this->load->helper(array('form', 'url'));
        $rules['username'] = "callback_username_check|required|min_length[5]|max_legnth[12]|xss_clean";
        $rules['password'] = "required|matches[password1]|md5";
        $rules['password1'] = "required";
        $rules['email'] = "required|matches[email1]|valid_email";
        $rules['email1'] = "required";
        $rules['fname'] = "required|xss_clean";
        $rules['lname'] = "required|xss_clean";
        $rules['street'] = "required|xss_clean";
        $rules['city'] = "required|xss_clean";
        $rules['state'] = "required|xss_clean";
        $rules['zip'] = "required|xss_clean";
        $rules['tos'] = "required";
        $fields['username'] = "Username";
        $fields['password'] = "Password";
        $fields['password1'] = "Password Retype";
        $fields['email'] = "Email";
        $fields['email1'] = "Email Retype";
        $fields['fname'] = "First Name";
        $fields['lname'] = "Last name";
        $fields['street'] = "Street";
        $fields['city'] = "City";
        $fields['state'] = "State";
        $fields['zip'] = "Zip Code";
        $fields['tos'] = "Terms of Service";
        if($_SERVER['REMOTE_ADDR'] == ''){
            $data['captcha'] = 'not required';
            $rules['recaptcha_response_field'] = 'required|callback_check_captcha';
            $fields['recaptcha_response_field'] = "Captcha Image Verification";        
            $data = array(
              'captcha' => $this->recaptcha->recaptcha_get_html()
            // Function to check to see if captcha is correctly submitted
            function check_captcha($val) {
              if ($this->recaptcha->is_valid) {
                return true;
              } else {
                $this->validation->set_message('check_captcha','Incorrect Security Image Response');
                return false;
        $this->validation->set_error_delimiters('<div class="error">', '</div>');
        if($this->validation->run() == FALSE ){
That works

This doesn't
function authenticate(){
        $id = $this->uri->segment(3);
        $hash = $this->uri->segment(4);
        $query = $this->db->query("SELECT * FROM users WHERE id='". $id ."' AND reg_hash='". $hash ."'");
        if($query->num_rows() == 1){
            $row = $query->row_array();
            $str['active'] = 'yes';
            $str['lvl'] = '2';
            $data['base'] = base_url();
            $data['msg'] = "Okay Continue";
            $data['login'] = base_url().'auth/login';
            $data = array(
                'header' => "Error!",
                'msg' => 'Some problems came up, either you waited to long and your account was removed or the link is invalid',

Using the same function from my class/library that is loaded and working to get the template to use.

Any Ideas why it does not work on the second one?

Okay something interesting I found will experimenting some more.

in my ThemeChooser.php file

if I change this

$CI->parser->parse($ThemePath.'header', $data);

to this
echo    $CI->parser->parse($ThemePath.'header', $data, TRUE);
echo    $CI->load->view($ThemePath.'left_bar',TRUE);

it will load the views/parse my templates on the pages that it is not loading. but it will not load certain css attributes. IE text formatting / placement.

Theme © iAndrew 2016 - Forum software by © MyBB