Php sessions switch image -
this question exact duplicate of:
i have home button on website, home button image of house. want make website userfriendly website. if clicking on button home button changing color , opens homepage. person knows on page he/she is. code far.
the problem of script it won't switch image i'm not expert in php sessions scripting, me out? searched google , couldn't find related question.
<?php session_start(); $_session['1'] = $_get["active"]; if (!empty($_get["active"])){ ?> <a href="<?php echo $this->createurl("/admin/survey/sa/index")."home"; ?>"> <img src='<?php echo $simageurl;?>home1.png' alt='<?php $clang->et("default administration page");?>' width='<?php echo $iconsize;?>' height='<?php echo $iconsize;?>'/></a> <?php } else{?> <a href="<?php echo $this->createurl("/admin/survey/sa/index")."" ?>"> <img src='<?php echo $simageurl;?>home.png' alt='<?php $clang->et("default administration page");?>' width='<?php echo $iconsize;?>' height='<?php echo $iconsize;?>'/></a> <?php } ?>
well, don't know, need session for. seams useless, if "read" $_get array. don't know query string state, try:
if (isset($_get["active"])) { ... }