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();
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
form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...
h
timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing
batch file not building to webapps folder
Hello. I just started running Vista :P and can't seem to get my projects deployed. I found out how
Guixt issue
Hello all,
We are experiencing the following problem with Guixt:
Some transact
cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti
Calander Basic Spript help
hi, just starting out with PHP and have the following script:
<?php
//This gets t
Product categories for registration
Dear all,
We are going live with the Supplier registered next week. At standard, the 'sel
Why is the logic of this simple code not working?
Hey, I'm trying to determine if a table already exists in mysql, but doing a query first with mysql_
Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i
PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the fi