CodeIgniter Forums
Parse error with - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Parse error with (/showthread.php?tid=41198)



Parse error with - El Forum - 05-01-2011

[eluser]matches[/eluser]
Hello,

I am getting the following error:
Quote:Parse error: syntax error, unexpected T_OBJECT_OPERATOR in Z:\xampp\htdocs\SFBAOH\application\controllers\agent_login.php on line 52

This is line 52:
Code:
if(this->form_validation->run() == FALSE)

I am fallowing along with the tutorial here:
http://a44.video2.blip.tv/5870002834299/NETTUTS-CodeIgniterFromScratchDay6219.mp4?bri=24.4&brs=590

Basically, I am just trying validate a registration form. Thanks for any info.

Code:
function create_member()
    {
        //$this->load->library('form_validation');
        
        $this->form_validation->set_rules('first_name', 'Name', 'trim|required');
        $this->form_validation->set_rules('last_name', 'Last Name', 'trim|required');
        $this->form_validation->set_rules('email_address', 'Email Address', 'trim|required|valid_email');
        
        $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[4]');
        $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[4]|max_length[32]');
        $this->form_validation->set_rules('password2', 'Password Confirmation', 'trim|required|matches[password]');
        
        if(this->form_validation->run() == FALSE)
        {
            $this->register();
        }
        else
        {
            $this->load->model('membership_model');
            if ($query = $this->membership_model->create_member())
            {
                $this->load->view('register_successful');
            }
            else
            {
                $this->load->view('register');
            }
        }
    }



Parse error with - El Forum - 05-01-2011

[eluser]toopay[/eluser]
You missing '$'
Code:
if($this->form_validation->run() == FALSE)



Parse error with - El Forum - 05-01-2011

[eluser]InsiteFX[/eluser]
Gotta love debugging your application LOL!


Parse error with - El Forum - 05-01-2011

[eluser]matches[/eluser]
GAH! OMG! so stupid! thanks!