diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 5ed2dc88e91dec7a6b9ee9e329154bb7e3ec383f..ffdcc05d149b154a97f9d6b888f4481e83af43fe 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -231,7 +231,7 @@ class page_action extends tform_actions {
 
 		//* Prevent that the database name and charset is changed
 		$old_record = $app->tform->getDataRecord($this->id);
-		if($old_record["database_name"] != $restriction . $this->dataRecord["database_name"]) {
+		if($old_record["database_name"] != $dbname_prefix . $this->dataRecord["database_name"]) {
 			$app->tform->errorMessage .= $app->tform->wordbook["database_name_change_txt"].'<br />';
 		}
 		if($old_record["database_charset"] != $this->dataRecord["database_charset"]) {