警告:mysqli_query()需要至少2个参数,1给定[重复]

This question already has an answer here:

Why do I get the error Warning: mysqli_query() expects at least 2 parameters, 1 given?

Below is the line that's not working:

mysqli_query("UPDATE `tbl_users` SET `profile` = '" . ($file_path) . "' WHERE `userID` = " . (int)$user_id);
</div>

Please search on Google. First hit: http://php.net/manual/en/mysqli.query.php

First parameter should be the connection resource. So the output from mysqli_connect.

When you create the connection to the mysql server like this:

$conn = mysqli_connect($servername, $username, $password);

You stored the connection in $conn

mysqli_query("connection variable","SQL Query");

In your case.. is missing the connection variable.

Try something like this (asuming that the variable you used to store the connection is named $conn):

mysqli_query($conn, "UPDATE `tbl_users` SET `profile` = '" . ($file_path) . "' WHERE `userID` = " . (int)$user_id);