This looks like a real hair pulling time thread.
You have your variables in the wrong place:
So if someone entered the username Fred and password of test the SQL which would be executed would be:
SELECT * from admin_login WHERE Fred = 'username' AND test = 'password'
It should be:
mideastgirl, it seems you should concentrate on learning how to debug code but putting in markers, etc so you can see where things are failing and narrow down the problem.
You have your variables in the wrong place:
Code:
$sql ="SELECT * from admin_login WHERE $sUsername = 'username' AND $sPassword = 'password'";
SELECT * from admin_login WHERE Fred = 'username' AND test = 'password'
It should be:
Code:
$sql ="SELECT * from admin_login WHERE username = '$sUsername' AND password = '$sPassword'";
Comment