I am getting an error on the $db line. I have tried placing a '->" before the prepare but then I get a Parse Error Syntax Error.
//try to login
$db = pdo-prepare($sql);
$username = $db->bindValue($_POST['username']);
$password = $db->bindValue($_POST['password']);
$tablePrefix = "";
$UserAndPassTable = $tablePrefix . "user";