Code Help PLEASE
Posted: Sun Mar 14, 2010 5:46 pm
Hello All,
I am having a little difficulty with some code I am working on and wondering if anyone can tell me where I am going wrong.
Basically, I have 3 seperate menu's to pull -
1.) Admin menu
2.) logged in menu
3.) Non-logged in menu.
Any help would be appreciated.
Thanks,
Patsman77
I am having a little difficulty with some code I am working on and wondering if anyone can tell me where I am going wrong.
Code: Select all
<?php
if($_SESSION['user'] != "")
{
$user=$_SESSION['user'];
$sql="select * from ".$football->prefix."users where user = '".$user."'";
$rs=$football->dbQuery($sql);
$row = mysql_fetch_object($rs);
if ($row->name == $football->admin_username)
{
include 'adminmenu.php';
}
elseif (($row->name != $football->admin_username) and ($row->name != ""))
{
include 'menu.php';
}
elseif ($_SESSION['user'] == "")
{
include 'menu2.php';
}
}
?>1.) Admin menu
2.) logged in menu
3.) Non-logged in menu.
Any help would be appreciated.
Thanks,
Patsman77