Welcome Guest, Not a member yet? Register   Sign In
Do i HAVE to use a helper file?
#2

[eluser]Michael Wales[/eluser]
You are in an object oriented development environment - you need to tell PHP what class to find that particular function in. In this case, $this works just fine.

Code:
$data['variables'] = array("username"   => $username,
                           "password"   => hash("sha256", $password),
                           "user_valid" => $this->validate_username($username));

On a side note, you probably want to make that function private by prepending an underscore (function _validate_username). Otherwise it is accessible via the URI.


Messages In This Thread
Do i HAVE to use a helper file? - by El Forum - 12-02-2008, 02:06 PM
Do i HAVE to use a helper file? - by El Forum - 12-02-2008, 02:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB