View Single Post
  #2  
Old 19th January 2012, 08:04
Blackbit Blackbit is offline
Junior Member
 
Join Date: Feb 2011
Posts: 11
Thanks: 3
Thanked 4 Times in 3 Posts
Default

$sql = "SELECT username, password FROM faculty WHERE username = $user AND password = $pass";

If you don't put the variables in the SQL-Statements into quotes, they are used as column names. It should be something like this:

$sql = "SELECT username, password FROM faculty WHERE username = \"$user\" AND password = \"$pass\"";
Reply With Quote