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
IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with
Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and
ALV List display - header width adjust
Hi,
I am using REUSE_ALV_LIST_DISPLAY for my ALV display.The width of the ALV varies for
PHP FTP connect doesn't work with correct login
Hi!
i am working on this test code:
Quote<?php
$ftp_ser
Help Import Animoto and Youtube
CAn someone help me urgently want to allow users on my website to import youtube/revver/dailymotion
listing help
Hi,
at first, great new design!!! I like it,
i got a problem,
I want to list so
Am I setting up my sites oldschool?
Ok,
When I create a site I open a basic template that I have created that consists of a css f
check how many commas the variable containing the query has between [i]select[/i
Hi...
iv made an sql table that contains id number - name of sql query and an sql query.
T
Advice on how to delete a mysql row using my form
Hi,
I am very new to php and am struggling to work out how to delete a portfolio item (a row
RSS feed - FeedList for WordPress
Hi,
I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of