Welcome Guest, Not a member yet? Register   Sign In
[Solved] - Problem in loading Validation Library
#1

[eluser]Prasanna[/eluser]
Hi all,

I have presented my code below which causes error on my server. But i have tested the same code in some other server, it works fine.

So may i know what causes error in the server. Do i needs to check any php.ini settings ?

Code:
<?php
class Sample extends Controller
{
    //Constructor
    function Sample()
    {
        parent::Controller();
    }

    function index()
    {
        //Load the required libraries.
        $this->load->library('validation');
        
        //Set the validation rules
        $this->_loginFrmRules();
    }

    function _loginFrmRules()
    {
        $rules['admin_name']        = 'trim|required';

        $this->validation->set_rules($rules);

        $fields['admin_name']        = $this->lang->line('login_username');

        $this->validation->set_fields($fields);
    }
}
?>

Output:

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Sample::$validation

Filename: admin/sample.php

Line Number: 23

Can any one guide me on how to fix this issue. Please help me.


Messages In This Thread
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 03:42 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 03:47 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 03:51 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 03:58 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 04:00 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 04:05 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 04:09 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 04:14 AM
[Solved] - Problem in loading Validation Library - by El Forum - 10-14-2008, 04:24 AM
[Solved] - Problem in loading Validation Library - by El Forum - 11-06-2008, 12:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB