self::error_message(mysql_error()); } $query = "UPDATE {$this->user_tablename} SET email = '{$this->email}' WHERE user_id = '{$this->user_id}'"; $result = mysql_query($query); if (!$result) { self::error_message(mysql_error()); } $query = "COMMIT;"; $result = mysql_query($query); if (!$result) { self::error_message(mysql_error()); } $ObjDb->db_close(); echo 'Email успешно изменен.'; } function error_message($msg) { $str = "Error: {$msg}"; echo $str; exit; } } include_once "../../libraries/authentication.class.php"; $authentication = new authentication(); $auth = $authentication->do_authentication(); if ($auth == 1) { die("Аутентификация не пройдена!"); } $obj = new PassEmailSaver(); $obj->save_pass(); $obj->save_email();