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 with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the pr
Impact of movement type 412 E on MAP
Hi
Usage of movement type 412 E is causing huge change in MAP .
Is there any r
mysql_query returning boolean instead of mysql ressource
Hi,
I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que
Why do I get this error?
Error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or
session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.
Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s
Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,
I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.
CALL FUNCT
Displaying Site Logo/Icon on a Title tag
really need some help out here. I want to insert a Logo/Icon just like the one close to the "PH
Get keys and values from an array
Hellow,
I have an array $Data with keys and values. With a foreach I can display all the valu
Run function every 5 mins ??
I have a function PostMessage()
How can I run it every 5 mins ??