Wildhalf Posted August 24, 2006 Share Posted August 24, 2006 Hi,I have a php script. One of the modules is called HtPasswd.class.phpWithin in this module there are2 functions i want to use addUser(email, password) cryptPass(password)What i need to know is how i can call these functions properly from my main php file called register.phpWhen i try either of these,$enc_pass = $Htpasswd->cryptPass($user_password);$this->$enc_pass = $Htpasswd->cryptPass($user_password);I get the following errorFatal error: Call to a member function on a non-objectAnyone out htere know how i can call these functions??thank you Kieron Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 24, 2006 Share Posted August 24, 2006 Make sure the classfile is included, then you should be able to do...[code]$enc_pass = Htpasswd::cryptPass($user_password);[/code]or[code]$htpasswd = new Htpasswd;$htpasswd ->cryptPass($user_password);[/code]Depending on your version of php. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.