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
login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks
Displaying image pathname instead of image
Hello
Im trying to upload and then display images from a mysql database - Its only basic and
PHP Blog help
Need help with posting comments in a word press blog? I have a comments page where the comments are
Is there something wrong?
Hi all,
Just a quick question... can someone look at this code and see if something is wrong?
Not connecting to DB using ruby, error:env.c:257:in oci8lib.so: ORA-12154:
Hi All,
I am trying to connect to the database server from the client server using ruby and f
$variable $variables type question
I need to be able to designate an array element dynamically, so I thought to use a variable variable
Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel
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
Quick Syntax Question
Hi folks,
I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b
getting a website's source code as a variable? How?
Hey guys, is there any way for me to get the source code of a website as a variable for me to work w