login.php — handles sign-in Starts a session and loads the DB connection (db.php). On a POST request, it reads email and password, validates they’re present. Looks up the user by email (SELECT * FROM users WHERE email = ?). Verifies the plaintext password against the stored password_hash using password_verify(...). If valid, stores the user’s id and username in the session and redirects to dashboard.php. If invalid, stops with “Invalid credentials.”
profile.php — shows a user profile; owner can edit bio/photo; lists poems, stories, and reviews Renders a simple profile page: Shows profile image (or default-avatar.png) and bio. If owner, shows a form to update bio and upload a new photo. Then the three sections: Submitted Poems, Submitted Stories, Reviews Given.