PHP MySQL Query Where x = $variable [closed] PHP MySQL Query Where x = $variable [closed] php php

PHP MySQL Query Where x = $variable [closed]


What you are doing right now is you are adding . on the string and not concatenating. It should be,

$result = mysqli_query($con,"SELECT `note` FROM `glogin_users` WHERE email = '".$email."'");

or simply

$result = mysqli_query($con,"SELECT `note` FROM `glogin_users` WHERE email = '$email'");


You have to do this to echo it:

echo $row['note'];

(The data is coming as an array)


$result = mysqli_query($con,"SELECT `note` FROM `glogin_users` WHERE email = '".$email."'");while($row = mysqli_fetch_array($result))echo $row['note'];