CodeIgniter Forums

Full Version: Parse error with
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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/....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');
            }
        }
    }

El Forum

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

El Forum

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

El Forum

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