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 Like 33 Dislike
Previous forums Next forums
Other forums

BAPI BBP_INB_DELIVERY_CREATE - material number missing in delivery
Hi Experts,

I was able to successfully create an Inbound delivery with reference to a PO

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

Why does first ever HttpSendRequest take longer?
I promise this isn't as simple as it sounds. I'm wondering why the the first ever call to HttpSendRe

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a

remove a ; from emails in textarea
Code: <?php

session_start();

$database_host = "localhost&qu

How to store checkbox array in a session, and then be able to add to it?
I'm trying to store an array of checkbox values into a session array, sort of like a shopping cart,

Structure Question - One Table or One Table Per Record Set?
I have a web app (mySQL and PHP) which allows people to create an item with up to 200 records which

COde for a Cc
I'm not receiving $ft as a Cc. Why is that??

$to = "$email";
$headers = "Fr

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash