What potential issues can arise when switching from POST to GET method in PHP form actions?

Switching from POST to GET method in PHP form actions can expose sensitive information as GET requests append form data to the URL. This can lead to security vulnerabilities if sensitive data is passed through the URL. To mitigate this issue, sensitive data should be encrypted before being passed in the URL.

// Encrypt sensitive data before passing it in the URL
$sensitive_data = encrypt($_POST['sensitive_data']);

// Redirect to the new URL with encrypted sensitive data
header("Location: process.php?sensitive_data=$sensitive_data");
exit;

// Decrypt the sensitive data in the receiving script
$sensitive_data = decrypt($_GET['sensitive_data']);