A
A
AaNdREX2020-05-20 22:59:35
PHP
AaNdREX, 2020-05-20 22:59:35

In the corner there is an error during authorization in the admin panel on the site, how to solve? question inside and details?

5ec5a0ef6b1d5994447909.png5ec5a0f0b9445586612341.pngError in the corner of the screen I can't log in to the admin panel
Notice: Undefined index: login_admin in /storage/ssd2/460/13786460/public_html/admin/index.php on line 54
Notice: Undefined index: password_admin in /storage/ssd2/460/13786460 /public_html/admin/index.php on line 54

Here is the code from line 54:
else if (!$Panel->b_checkAdmin($_SESSION["login_admin"], $_SESSION["password_admin"]) && (($path ! == "/admin/auth") && ($path !== "/admin/auth/"))) {
header("Location: /admin/auth");

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2020-05-20
@xmoonlight

Delete cookies.

A
AUser0, 2020-05-21
@AUser0

I think the use of different variables in if prevents you... Line 51 is about $_SESSION['admin _login '] and $_SESSION['admin _password '], and line 54 is about $_SESSION[' login _admin'] and $_SESSION[' password _admin'].
Perhaps this is the problem, but the first option is correct:

else if (!$Panel->b_checkAdmin($_SESSION['admin_login'], $_SESSION['admin_password']) && (($path !== "/admin/auth") && ($path !== "/admin/auth/"))) {

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question