I'm getting this error. It's part of a login script I'm working on. Here's where the error is. The error is line 36, which is commented.
if (isset($_POST["username"]) && isset($_POST["password"]))
{
$temp_pw = trim($_POST["password"]);
$temp_user = trim($_POST["username"]);
echo $temp_user;
echo $temp_pw;
$sql_string = 'SELECT * FROM '.$sql_db_prefix.'users WHERE username = '.$temp_user; //line 36
$result = mysql_query($sql_string);
$temp_sql_row = mysql_fetch_array($result);
if ($temp_pw == $temp_sql_row["password"])
{
$_SESSION["loggedin"] = true;
$_SESSION["username"] = $temp_username;
}
}
Also, if there are any better ways to do things in there, please tell me, I know a lot of app/game programming but I just recently started php.