If statement help please.
Posted on
16th Feb 2014 07:03 pm by
admin
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and the second one is for a sub navigation (which is a small box). I am trying to write an IF statement so that if ?content=(a certain value) then the sub navigation which is box #2 will display that page sub navigation. Here is what I have so far.
Code: <?
session_start();
Did you know?Explore Trending and Topic pages for more stories like this.
include'dbconfig.php';
$content = $_GET[content];
if($content != 'hub' or $content !='hr' or $content !='crewcenter'){include'content/newmembers.php';}
//Displays side menu for HR navigation
if($content == 'hr'){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><strong><a href="#">Roster</a></strong></div></td>
</tr>
<tr>
<td><div align="center"><strong><a href="#">Staff</a></strong></div></td>
</tr>
<tr>
<td><div align="center"><strong><a href="#">Job Openings</a></strong></div></td>
</tr>
<tr>
<td><div align="center"><strong><a href="#">Forms</a></strong></div></td>
</tr>
</table>
<? }elseif( $content == 'crewcenter' }{
}
?>
The main problem I am trying to fix is that when I go the HR page it shows the newmembers.php and it still shows the hr submenu, I just want to show the HR submenu. This is the same problem for the crew center. Please help.
Thanks in Advanced
No comments posted yet
Your Answer:
Login to answer
336
33
Other forums
Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server.
text box alphanumeric caracters only
hi all!
I have search on google on how to enter in a test box only caracters A-Z,a-z,0-9 usi
Custom list order
Hi there,
I have checked this tutorial and it's great till the point where I want to display
Count
Getting the same count everytime
Code:
$visitquery = mysql_query("SELECT COUNT(*) FR
Scheduler problems related to execution of a single BLT by many schedules
Hello all,
We are running several MII instances in a distibuted architecture using a sing
From Header Showing 'Unkown' In Hotmail? Why?
Code: $to = $row_GetID['email_addr'].',sales@mywebaddress.co.uk';
$subject = 'Thank you for you
defining website tags
Hi,
What would be the best way to define tags for my site, such as website title, url etc.
Trouble verifying database password
Thankyou to everyone who responded to my last post (I can't find the posting, it has been buried). <
How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..<
HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to