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
C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr
Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:
Help Ordering Arrays
Hi, I have 3 arrays as shown below.
Code: $users = $this->get_latest_users();
$flir
What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor
j1inmis Ouput layout changes
Hi,
Can anybody tell how can j1inmis output layout can be changed so that vendor names ge
error reporting
hey everyone
I have a production server in which I want error reporting but only on some page
Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.
phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:
Code: [Select]$mailer = new PHPMailer();
$mailer-&
How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php
Thanks in advance
Month String to Numeric?
Hi guys,
Given a month as a string, is there a simple way to find the numeric representation