Jump to content

[SOLVED] Fatal error: Cannot redeclare hash()


jkewlo

Recommended Posts

Hello, I am back yet again ><

 

So I have run into this error

 

Fatal error: Cannot redeclare hash() in /var/www/www.eve-lounge.com/htdocs/v2/data/function.class.php on line 23

 

my question is why? this is my code line 23 is in the function hash() and is the closing } bracket.

 

I dont understand why I am getting this error and how will I got about fixing it. Thank you very much.

 

//clean input
function sanatize($data){
$data = stripslashes($data);
$data = htmlentities($data);
$data = mysql_escape_string($data);

return $data;
}

//hash + salt function
function hash($data){
$salt = "R3\£41d*7\"2$,.";
$data = $data . $salt;
$data = sha1($data);

return $data;
}

//update lastclick in database
function lastClick(){
$username = $_SESSION['username'];
$sql = mysql_query("UPDATE `users` SET lastclick = 'NOW()' WHERE username = '$username'");
}

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.