Jump to content

Function Help


unidox

Recommended Posts

I have a function to add certain elements into sql. This is it:

 

function add(array("username", "password", "email")) {
	$i = 0;
	foreach($arr as $v){
		$i++;
		eval("$" . $v . " = " . escape_data($_POST[$v]) . ";");
	}
}

 

That code turns it into variables in order to place it in sql. But my question is for the password field. I dont want to use escape_data on it because I want to use md5(). I was wondering how I would go about doing that. Thanks

Link to comment
https://forums.phpfreaks.com/topic/108044-function-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.