I want to show a DIV ONLY when on /../mahjong.php. So even if I go to /../mahjong.php?layout it should hide the div (since it's not the same url)
I have tried the following:
// We're NOT on the home page
if (strpos($_SERVER['REQUEST_URI'], "/games/mahjong/mahjong.php") >= 0) {
$style = "display: none";
}
else {
$style = "display: inline";
}
And my div ofcourse:
<div class="menu" id="menu" style="<?php echo $style; ?>">
But if I go to /games/mahjong/mahjong.php?layout it doesn't change the style. I've echoed:
echo $_SERVER['REQUEST_URI'];
and it changes to /games/mahjong/mahjong.php?layout, so why isn't the style set to inline?
if (strpos($_SERVER['REQUEST_URI'], "/games/mahjong/mahjong.php") === false) {
Didn't work either. (this wil show the div and never hide it) What am I missing?
Many thanks,
Maurice