Jump to content

php function doesn't work


wesley
 Share

Recommended Posts

Hello,

 

I have a function that looks at whether there is md5 or sha1 is used. The function would then encrypt the word password. But this he does not.

How can I make the variable $method?

$methode = md5 (); doesn't work, $method = md5; doesn't work

 

can someone help me?

 

thanks in advance

function encrypt($input, $method){		if($method == "md5"){			return md5($input);		}else{			return sha1($input)		}					}			$input = "password";		$methode = md5 (); //this doesn't work	echo encrypt($input, $method);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...