God i'm stupid...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Daisy Cutter
Forum Commoner
Posts: 75
Joined: Sun Aug 01, 2004 9:51 am

God i'm stupid...

Post by Daisy Cutter »

i want to do something SO simple yet i just can't figure it out! :oops:

Code: Select all

<p class="center" id="lurking">
<strong><a href="/url/contact.php&show=lurking">other places i lurk</a></strong>
<br />
<span class="hidden">
...
</span>
I want to make it so that if the current page is index.php?url=contact.php&show=lurking, the class="hidden" on the span is not shown.

it's beacuse the CSS i use to show the hidden span on hover doesn't work in IE.
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

Code: Select all

$hidden = (($_GET['url']=="contact.php") && ($_GET['show']=="lurking")) ? "" : " class="hidden"" ;

echo "<span$hidden>";
Last edited by nigma on Sun Nov 07, 2004 6:57 pm, edited 2 times in total.
Daisy Cutter
Forum Commoner
Posts: 75
Joined: Sun Aug 01, 2004 9:51 am

Post by Daisy Cutter »

that just makes an error:
Parse error: parse error, unexpected ':' in /home3/mcovey/public_html/contact.php on line 18
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

I edited my post to correct my error. Sorry.
Daisy Cutter
Forum Commoner
Posts: 75
Joined: Sun Aug 01, 2004 9:51 am

Post by Daisy Cutter »

thanks.
Post Reply