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
Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil
A little help needed passing hidden values to next page
I have a page that has hidden values in a form.
example
Code: <input name='signupID
urldecode question
How would I format this line of code properly?
<?php echo urldecode($_GET['Title']); ?
Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and
Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so
Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24
trouble printing an array....
I'm having some trouble printing out an array forwards. I'm figuring out the high and low of an arra
Unexpected T_Variable ?
Hi all,
I dont really know what I am doing!! I know I'm doing something wrong, and I know its on
Help with email validation please...
Hi,
Please could you help.
I have a register.php login page where users register, the detail
listing help
Hi,
at first, great new design!!! I like it,
i got a problem,
I want to list so