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
shift numbers with paging
Hi
How would i be able to display 10 numbers 1 2 3 4 5 6 7 8 9 10
and when I click next
Asset Transfer from One plant to another within same company code
Hi,
Please advise how to transfer one asset from one plant to another plant within same c
How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di
Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming
Target costs on Process orders not calculating
Hi All,
We have released standard costs for all the materials. We have also done Goods r
problem in pagination when processing with selectbox form
Hi,
I have a search form, with select boxes, if am selecting the value from the form, it work
Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.
So I have a bas
Inserting Data into a MS Access DB using PHP.
As part of my uni course I am doing a placement at a company whom want me to create a client zone fo
Prevent PHP mail( ) from appending hostname to from address
Hey guys,
I want to be able to send texts to phones via email (since each phone has their own
Concatenate two strings ???
I have string one $string1 and another $string2.
How to concatenate (add) both of them $str