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
LOOPing Problem
Hello All!
The following code loops through the data and displays the data accordingly. My p
Delete records not in top 15
Hi,
I'm creating a hall of fame page in my game and the page will only display the top 15 sco
compile php5 with DOM
Hi,
I can't manage to compile php 5.3.0 from source on Windows to include DOM,
in spite of
frames get header location..
i have two frames, one top, one bottom. how do i do a form on the bottom frame that gives me the ur
strtotime issue
Hey all,
I'm playing around with some code, and basically the idea is:
Person changes
Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still le
Multi Dimensional Array Append
Hi Guys
I have a function that returns a multidimentional array eg
$result = functio
extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c
do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work
PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho