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
336
33
Other php-forum
help with this code please?
Hello,
I am trying to build a remote upload script for my image hosting site.
I am usi
Better Method of a Member Cloud
I assume most people know how tag clouds work, where the tags most used are bigger and the least use
Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can
Update Database
Hi All,
I have a problem with this:
Code: [Select]<?php
session_start();
fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw
code help - pagination
Hi all, I have this code, basically a user logs into my site and they get this page.
The pro
IP Based Cron Jobs
I run cronjobs on my website. After one of my visitors got curious and tinkered around he realized h
Display the user's weight lost in the past week
Hello everyone,
I am working on a weight loss app for my site, and I want to display the user
PHP XML extraction text
I would like to extract an xml text and have that text directly echo(print) out on my web page. Her
Day of week
I am using PHP version 5.0.5
I have a varaible ($DATE (date format yyyy-mm-dd)) that is being inc