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
please hep to get values from a table row
can anyone tel me how I can select and get data from one row by pressing an Edit button in that row
Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been
problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:
Code: $query = &quo
Request.UrlReferrer
I need to make it so that a page can only be loaded when a button is clicked on a specific page. I d
PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope
MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro
Weird Problem with curl while sending data
I am facing a weird problem with sending data to a site via curl.
If i send the value by this
Get ID from Database when Posting with a HTML Form
I have a form I am submitting to a MySql database. Each product has an ID # attached to it that auto
Sessions work for me and not others?
I'm having a bit of bad luck with sessions. In the past they have worked fine for me, but this time
urldecode question
How would I format this line of code properly?
<?php echo urldecode($_GET['Title']); ?