I dont know why but this code isnt working. What i’m trying to do is get the action and message id from the user and depending on the message id, show the entire conversation of the user.
if (isset($_GET['action']) && isset($_GET['message_id']) === true) {
if ($_GET['action']=="read_conversation" && $_GET['message_id'] == $message_id) {
echo 'this is true';
} else if (isset($_GET['action']) !== "read_conversation" || isset($_GET['message_id']) !== $message_id) {
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=index.php">';
}
}
It keeps redirecting to index….when i only want it to redirect if the variable action and message_id are not equal to the values that they click on…
Here is your problem. isset($_GET[‘action’]) returns true or false and you are trying to compare it to “read_conversation”