prepare($sql); if ($stmt->execute([$user_id])) { // Update role in session $_SESSION['role'] = 'pro'; $_SESSION['success_message'] = "Congratulations! You have successfully upgraded to the PRO plan."; } else { $_SESSION['error_message'] = "Something went wrong during the upgrade. Please try again."; } header('Location: dashboard.php'); exit();