PHP. How to fix the error? "Notice: Undefined variable: mysqli"?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
27 views
Good afternoon. Please help to correct the error Notice: Undefined variable: mysqli

Notice: Undefined variable: mysqli in C:\\xampp\\htdocs\\vik2\\auth.php on line 39


The authorization script:
Login.php
<?phpinclude("dbconnect.php");require_once 'auth.php';// If post, check userif (!empty($_POST['userlogin']) && !empty($_POST['pass'])) {// Verify user and passwordif (isValidUser($_POST['userlogin'], $_POST['pass'])) {// Log in$_SESSION['userlogin'] = $_POST['userlogin'];header('Location: index.php');exit();}else{$_SESSION['userlogin'] = FALSE;}}// The user login pageinclude 'templates/header.php';?><!--login modal-->User authentication
<?phpinclude 'templates/footer.php';</code>
by | 27 views

1 Answer

0 like 0 dislike
function isValidUser($user, $pass, $mysqli)
by

Related questions

0 like 0 dislike
1 answer
asked Apr 14, 2019 by HealerFive
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
35,405 users