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
Help: calling function
Hi,
Is it possible to call a php function on page close?
If yes, could you explain how and whe
Binding 2 UDP sockets on same port, connected to different destinations, 1 receives
Hello,
My application wants to send/recv data to 2 different UDP ports on a remote computer, us
Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file
Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...
Code: $define_li
Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very
Accessing element of object array
Hello
My object looks like this:
Array ( [0] => User Object ( [id] =>
Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp
multipart emiail forms
Hi All,
I am new to the boards and I've been working on a form (which is rather massive, imo
Problems with strings containing
Hey all,
I have encountered something strange in a script. I am trying to write an XML heade
Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?
here is my code