prepare("UPDATE users SET password = :password, force_password_change = 0 WHERE id = :id"); $stmt->execute([ ':password' => $hashed_password, ':id' => $_SESSION['user_id'] ]); $_SESSION['force_password_change'] = 0; $success = "Password changed successfully. You will be redirected to the main page in 3 seconds."; header("refresh:3;url=index.php"); } catch (PDOException $e) { $error = "Database error: " . $e->getMessage(); } } } ?> Change Password

Change Your Password

As a new user, you must change your password.