I'm trying to pass a var in my URL. I sdecided I need to encode the vars using base64_encode. In order to change that parameter in the URL I decided to throw in some dynamically changing string, like time.
Here's the working code.
if (!mail($to, $subject, $message, $headers)) {
$result = "failed";
} else {
$result = "sent";
}
$timeNow = date("D M j G:i:s T Y"); // use for incrypting string
header("Location: ./mepage.php?val=".base64_encode("&msg=".$result."&t=".$timeNow)."");
Now, on the receiving side I need to get that $result value. Naturally I decode it by doing something like that:
if ($_GET['val'] != '') {
$receivedMsg = base64_decode($_GET['val']);
}
Now all I need is to extract that $result value. All of a sudden I can't think of how to get it. How do I do that?