V
V
Vladislav2021-09-23 16:34:37
PHP
Vladislav, 2021-09-23 16:34:37

Why is mysqli_query variable highlighted?

Highlights a variable in the code mysqli_query($connect);
The database connection is in the connect.php file, and mysqli_query is in another signup file. At the very beginning, sign up wrote - It connects to the database, did a check, it does not give errors. Here is the connect.php code
require_once 'connect.php';

$connect = mysqli_connect('localhost', 'simply','simply' , 'tets');
    if(!$connect){
        die('Error connect to DB');
    }

Here is the signup.php code
if($password === $password_confirm){
        mysqli_query($connect );
    }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gennady, 2021-09-23
@Simply-DJI

It's your IDE (code editor). He does not understand where this variable comes from. If everything works, then it's okay.

H
hsmhmhmhmhmhmhm, 2021-09-23
@mazdana

because you need to read from the beginning https://www.php.net/manual/ru/mysqli.query.php
Highlights means it asks to pass 1 more parameter
mysqli_query($connect,"SELECT * FROM blablabla" );
Well, it's better to use PDO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question