Generalization of the dbname
diff --git a/php/change_password.php b/php/change_password.php
index d02f389..d8bcc19 100644
--- a/php/change_password.php
+++ b/php/change_password.php
@@ -2,12 +2,16 @@
 	require '../credentials.php';
 	require 'utils.php';
 
+	$credentials = new Credentials();
+	$usersdb = $credentials->usersdb;
+	$mortsdb = $credentials->mortsdb;
+
 	// Check if confirmation is the same
 	if ($_POST['password'] != $_POST['confirmation']) {
 		die("<script>window.location.href = '../index.php?wrongconfirmation=1'</script>");
 	} else {
 		// Execute query to change password
-		$update_password = "UPDATE users SET password=\"".md5($_POST['password'])."\" WHERE id=".$_POST['userid'];
+		$update_password = "UPDATE $usersdb SET password=\"".md5($_POST['password'])."\" WHERE id=".$_POST['userid'];
 		if(!$result = query($update_password)) die("<script>window.location.href = '../index.php?errordb=1'</script>");
 		
 		// Save 'password' to cookies