Jump to content


Need help calling functions

  • Please log in to reply
1 reply to this topic

#1 Wildhalf

  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 24 August 2006 - 08:56 PM


I have a php script. One of the modules is called


Within in this module there are2 functions i want to use

addUser(email, password)

What i need to know is how i can call these functions
properly from my main php file called register.php

When i try either of these,
$enc_pass = $Htpasswd->cryptPass($user_password);
$this->$enc_pass = $Htpasswd->cryptPass($user_password);

I get the following error
Fatal error: Call to a member function on a non-object

Anyone out htere know how i can call these functions??

thank you


#2 hitman6003

  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 24 August 2006 - 11:10 PM

Make sure the classfile is included, then you should be able to do...

$enc_pass = Htpasswd::cryptPass($user_password);
$htpasswd = new Htpasswd;
$htpasswd ->cryptPass($user_password);

Depending on your version of php.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users