Hello,
I have 4 images on my header of the web page. They are mouse over.
ex image1 > about us
image 2 > portfolio
when i put mouse on the image image swaps. when i go to > about us I want my swaped image to stay there still.
What I thought is the best solution is to do
$_SERVER['REQUEST_URI'] to get URL of the section. Then use if and else statement to display swap image or original swapable image.
I have written a sample if and else code if you guys can help me to correct it i will be able to fix it to my need.
Ex.
Url is http://mysite/about/news.php
<?php
$link = $_SERVER['REQUEST_URI'];
if ('/about/news.php' == "$link") {
echo "word found!";
} else {
echo "not found";
echo "$link";
}
?>
I want everything after "/about/" to be equlas to link. If there is no word "about", not equals to $link. I am not sure is there wild character I could use or a better solution??? 😕
I also though to have on each page a hidden field lets say all pages in "about" folder of the website shold have hidden field about and then if and else statement look for that field. But I cant figure how to do that.
Any help will be apreciated. thanks in advance.