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 Like 33 Dislike
Previous forums Next forums
Other forums

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Pagination
Okay here is the page in question: http://blenderteachings.000a.biz/tutorials.hamishhill.php

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

How many users online in the last 24-hours using time()?
I'm fairly new to PHP. I have a MySQL table called 'users' and a field called 'loggedin' which is in

Ajax Error since Upgrading to 3.5
Ever since upgrading my site to .NET 3.5 (I needed LINQ), I've been getting this annoying error on o

Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:<

Multiple submit forms inside a mysql array page
Hi all,

Im having trouble to get the beneath script to work the thing i can't seem to get wor

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

Include ("Absolute Path") of a file?
I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that

Coding question?
Hey guys, I have a quick question. If I want to make a way for people to pay for health in my game,

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash