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
Image upload - determine folder
I have an upload script that may be accessed from different directories. Problem is, the script is m
Send current URL in URL with a $_GET variable problem.
Hello community,
I have created a function that gets the current variable of a page, example:
Delete records not in top 15
Hi,
I'm creating a hall of fame page in my game and the page will only display the top 15 sco
Interpret Order
Hello all,
I'm wondering if I have this:
Code: $switch = array(
'one' =>
PHP Surveys
I really would like some advice.
If you have a client come to you asking for a survey to be d
IP Logger for Voting Script
Can anybody help me place an IP logger into my voting script?
I know that maybe it is not as secu
What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c
error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc
PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a
Require select-option functionality in Module Pool Programming
Hi Gurus,
I am doing a development by Module Pool on Warehouse Management. For that devel