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
Need help making login verification cleaner...
I use the below to verify user login. I first check the cookie for the id, ip and a unique id. If it
Validating time
Hi Guys
what do you think of the following approach to validate a 24hour time:
http://
Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system
Say I go to h
PHP and Javascript
Hello Everyone,
I have a page that needs a javascript code to be written between PHP code but
PHP Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is
Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t
Slashes
Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and i
Oracle Connectivity
Hi Every One,
Can we access SAP from oracle database.If it possible then please spec
Error In Syntax
I got this error:
Code: Parse error: syntax error, unexpected '>' in /home/bucket/publ
Simple image grab script.
I was wondering if it was possible and if anyone knew how to make a simple php script that looks at