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

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two va

classic dynpro : hide area and auto adjust hights
Hi,

I want to develop a similar user interface as is used in standard transaction MIGO.

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

PHP5/Zend 2.0 - Resources
PHP5 Snapshots
http://snaps.php.net/

ZEND 2.0 Feature Overview and Design (PDF File

Having problemswith multithreading and prime numbers
I have an assignment when I'm suppose to do the following:

Write a multithreaded Java, Pt

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

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