Error while sending post request
Warning: mysqli_query () expects at least 2 parameters, 1 given in /home/u249644105/public_html/getUser.php on line 12
Warning: mysql_fetch_array () expects parameter 1 to be resource, given in /home/u249644105/public_html/getUser.php on line 14
Code itself
if($_SERVER['REQUEST_METHOD']=='POST'){ //Getting values $imei = $_POST['imei']; $sql = "SELECT * FROM user WHERE imei='$imei'"; require_once('dbConnect.php'); $result = mysqli_query($sql); $array = mysql_fetch_array($result); echo $array['username']; } When sending with a POST request, find it in the database and send a response in the form of the username associated with it