Trying to use a $_GET within a $_GET It's not throwing any errors but isn't working the way I want it to. It's been a while since I've done this so I don't know if I'm overlooking something or not. I'm trying to be able to do something like index.php?chatroom&id=1
$pgtitle = '';
$cractive = '';
$dactive = '';
$acactive = '';
$pgChat = '';
if(isset($_GET['chatroom'])){
$cractive = 'active';
if (isset($_GET['cid']) == "1") {
$pgChat == 'Global Chatroom';
}else if(isset($_GET['cid']) == "2"){
$pgChat == 'AK Chatroom';
}else if(isset($_GET['cid']) == "3"){
$pgChat == 'AZ Chatroom';
} else {
echo '<meta http-equiv="refresh" content="0; URL=index.php?chatroom&cid=1">';
}
}else{
header('Location: index.php?dashboard');
}
isset($_GET['cid'])just returns if the key is set, not what the value is.isset($_GET['cid']) == "1"will always return true if it exists, which it does not. You're passingidin the Url, but checking forcid