WARNING: This page contains intentional SQL injection vulnerabilities for educational purposes only.
Do NOT use in production or deploy publicly.
Practice Login
Successfully logged in as: '.htmlspecialchars($user['username']).'
';
} else {
echo '
Test Cases:
Try these in username field to practice SQLi:
admin' OR '1'='1 (Classic SQL injection)
admin'-- (SQL comment to bypass password check)
admin'/* (Alternative comment syntax)
Proper prevention: Use prepared statements with parameterized queries.