Jump to content

[SOLVED] If/Else and $_GET


The Little Guy

Recommended Posts

Am I blind or something?

The first link works an the second one doesn't.

Their are six more of the links (formatted the same as the first link) above the first link which also work.

 

<a class="<?php if($action=='stats'){echo 'mailNav1';}else{echo 'mailNav2';}?>" href="/home?action=stats">Stats</a>
<a class="<?php if($action=='feed'){echo 'mailNav1';}else{echo 'mailNav2';}?>" href="/home?action=feed">Feed</a>

 

Basically when I am at this location: /home?action=feed it displays one of the other links... pages instead:

<a class="<?php if($action=='profile'||!isset($_GET['action'])){echo 'mailNav1';}else{echo 'mailNav2';}?>" href="/home?action=profile">Profile Info</a>

 

 

Link to comment
https://forums.phpfreaks.com/topic/103029-solved-ifelse-and-_get/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.