Simple Forum

Invalid username or password

'; } } // Check if the form is submitted for registration if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["register"])) { $newUsername = $_POST["new_username"]; $newPassword = $_POST["new_password"]; // Dummy registration (replace with database storage) $users[$newUsername] = $newPassword; echo '

Registration successful! You can now log in.

'; } ?>

Login

Register