-2

i have a basic doubt.

i have this example:

$sql = mysql_query("SELECT * FROM admin where id =  username='$username' and password = '$password' LIMIT 1");

Its possible to see what this sql command is doing in the browser? To see if it is correct..

Thanks.

samayo
  • 16,163
  • 12
  • 91
  • 106
user2469122
  • 101
  • 1
  • 8

2 Answers2

1
$a = "SELECT * FROM admin where id =  username='$username' and password = '$password' LIMIT 1";
echo $a;
$sql = mysql_query($a); // use mysqli instead 
Biswajit Maji
  • 869
  • 13
  • 23
0

if you will print the $sql it will print #resurce #4

you need to do:

$q = "SELECT * FROM admin where id =  username='$username' and password = '$password' LIMIT 1";

print_r($q);

and you see it in the network tab on the console or in the browser if you print your request

Idan Magled
  • 2,186
  • 1
  • 23
  • 33