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
how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service
Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :
Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jp
Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that
Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
In the html page one text box
Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to
Having a problem get the selected item from a drop down menu
I have been looking at this for days now.
I have a drop down menu that get it's values from a
Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo
Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g
Session problem?!?
Hello All! I am very new to the php world but I am working on fixing things that a previous programm