Im trying to do a link from one page to another, on the link itself I send a variable that the receiving page gets with php, then I need the php to echo out js to change the css display on two divs, changing the div whose default css is block to that of hidden and a second div whose default css is none to that of block. I have suucesfully passed the variable within the url, and the js to change the second div to block works, however the 1st div css doesnt seem to change to none as the div still shows
PHP code
if (isset($_GET['display'])) {
if(!isset($_GET['yes'])) {
echo '<style type="text/css">
#slideshow {
display: none;
}
</style>';
echo '<style type="text/css">
#aboutus {
display: block;
}
</style>';
}
}else{
};
Can anyone help me resolve this please
?display=yes, then instead ofif(!isset($_GET['yes']))useif(trim($_GET['display']) != 'yes')