I have a mysql table called "Users" with four columns. I have a php file that starts out by defining a session variable below. But then later on, when I try to select the specific row in the table "where Username=$username", I get the error message "Unknown column 'bob' in 'where clause'." But if I replace that with "where Username='bob'" all of a sudden it works. Am I not allowed to use a php variable like $username in my "where" search?
$username = $_SESSION['username'];
$result = mysql_query("SELECT * FROM Users WHERE Username=$username") or die(mysql_error());