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
How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing else
I can give them an F
Web Host List
Here is a list of web hosts that offer PHP and MySQL. It is no where near a full list, but it is mos
DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario
help need on ob_start()
Hi
I am a newbie in php, I have a code
Line number On/Off | Expand/Contract <?phpo
PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would
phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";
Mail from PHP form not always ending up in my inbox?
Hi guys,
I'm a real newbie to PHP and have managed to put together a simple mail form that se
Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i
PHP Surveys
I really would like some advice.
If you have a client come to you asking for a survey to be d
C - Reading a file into a byte array
Hi,
I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru