am a bit of a n00b with php, and am just wondering if "if" is the right code for what I need.
I want to make button links unclickable when their page (s) are called and was wondering the best way to do it.
I have been trying to make the if tag work for it, and maybe it's just that im doing something wrong, but, it won't.
here are the 2 states I want:
active:
<a href="index.php"><img src="index.jpg"/></a>
inactive:
<img src="index.jpg"/>
I was trying to simply use this, but it won't work for me:
if ($page == "index")
{
echo "<img src="index.jpg"/>";
}
else {
echo "<a href="index.php"><img src="index.jpg"/></a>";
}
Can anyone help please?
Thanks.