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
Help With editting and deleting form
Hallo !!
So look at this image :
http://img194.imageshack.us/img194/8272/snapshot5f.pn
Help with PHP Email Script
Hi guys,
I'm a newbie to php and need help with the script below:
At the moment when I
how to insert value
I am having file bookissueadd.php..... in which i am having tag
<td height="21&q
Giving the below syntax error
Dear Experts,
I have used 2 buttons in gui status as display and cjhange.When the user wi
xml element exists
Code: [Select]<?xml version="1.0"?>
<Addresses>
<
UDP server recvfrom() always returns -1? :(
Hello all,
I am getting a very strange error in my code :( I am writing a server application in C
Reading waves
Hi,
I am trying to find a way of finding the highs and lows on a graph line, the line points
check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it
Accept only alpha characters
I've got this bit of code ready for accepting a phrase:
Code: if (!eregi ("", $_POS
How to ... (FAQs)
... get e-mail notifications
As several people asked how to get e-mail notifications when new posti