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 remove in php string display
My code is
$message="We're looking at developing our website.";
$body= "
Allowing ' and "
Hello everyone,
I am creating a form where users submit information to go into a database. I
Inserting multiple records from single form
I've found a number of threads that deal with this issue, but I'm new to php and coding language so
Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav
Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and ov
Career Change into SAP
Hai
I am sajesh ,did my diploma in Mechatronics i have a 4 years of experience in
Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"
keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde
can i optmize image to 50% quality before uploading 2 server
Hi there
i have jus written a php program to upload and display images but when i try to uplo
foreach help.
Hello all,
First time I'm attempting to use a foreach statement and was just wondering if my