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();
Did you know?Explore Trending and Topic pages for more stories like this.
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
Where is my php.ini???
Hi
First off - apologies - i'm not a coder so this may sound very amateur.
I'm having
Splitting Attributes
SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",
substr(I_NAME, IN
Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?
file_put_contents and createimagefromjpeg
All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename
While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess
Images outside webroot
Im hopeing someone can help me with this because i cant figure it out.I have setup an ASP.NET websit
an interesting question
Greetings folks, got to ask an interesting question...
let say
i have created a function s
Email Form Syantax Issue 2
How to make this look FROM:"OUR TEAM" instead of FROM:abc@mail.com
$headers = "
problem with script manager
Hi iam using Net.2005.I have created ajax enabledwebsite.i have master page in which i have script m
Unique Visitor Tracking
Hello. Currently, I run a voting site where voters are tracked by their IP address and can only vote