1 pointOr it could be that INSERT queries do not have a WHERE clause
1 pointThis tutorial should get you on your way with PDO.
1 pointyou need to call session_start() before any output is sent to the browser (top of the script usually) Do not put identifiers (table and column names) in quotes. The whole purpose of using prepared queries is so you don't put user-provided vaariable directly into the query. Do not needlessly create variables. Do not store passwords as plain text, use password_hash() and password_verify() $query = $conn->prepare("SELECT COUNT(id) FROM users WHERE username = ? AND password = ?"); $query-> execute( [ $_POST['username'], $_POST['password'] ] );
This leaderboard is set to New York/GMT-04:00