advanced
Vulnerability Assessment
Identify security flaws in a provided code snippet.
📝 प्रॉम्ट सामग्री
Review the following PHP code snippet for a user login system. Identify three distinct security vulnerabilities (e.g., SQL Injection, XSS, Session Management issues). For each vulnerability, explain why it is dangerous, provide an example of how it could be exploited, and write the corrected secure code.