ok new code is as follows
<?PHP
//main function script
//define if functions here to call functions
if($_POST['Submit']==Submit)login();
elseif(Events==true)events();
elseif(Crafting==true)Crafting();
elseif(Quest==true)Quest();
elseif(profile==true)profile();
elseif(Communications==true)Communications();
elseif(Logout==true)Logout();
else die('<center><span style="color:FFFFFF">what are you doing, you need to login first!');
function login(){
$user=$_POST['user'];
include 'mysql.php';
//do the login query
$query=("SELECT username, password FROM website where username = '$user'");
#echo $query; //used for degub of script
$result=mysql_query($query, $db);
if(!$result)die('<center><span style="color:FFFFFF">>unable to get information, contact site administration' .mysql_error());
if (mysql_num_rows($result)==0)die('<center><span style="color:FFFFFF">incorect user name');
//check that the user name and password are correct
$row = mysql_fetch_row($result);
if($row[1] > $_POST['pass'])die('<center><span style="color:FFFFFF">Wrong password, Try again<br><center>Click back to continue');
#echo ('<center><span style="color:FFFFFF">sucess!');
if($row[1]==$_POST['pass'])$_SESSION['login']=true;
$_SESSION['username']=$row[0];
session_cache_expire(60);
mysql_close($db);
members();
};
function members(){
include 'mysql.php';
$user=$_SESSION['username'];
//do the get account query
$query=("SELECT username, name, rank FROM website where username='$user'");
#echo $query;
$result=mysql_query($query, $db);
if(!$result)die('<center><span style="color:FFFFFF">unable to get information: ' .mysql_error());
$row = mysql_fetch_row($result);
if($row==0)die('<center><span style="color:FFFFFF">unable to get any record information, Contact site Administration');
$user=$row[0];
$name=$row[1];
$rank=$row[2];
include 'pages/member.php';
mysql_close($db);
};
function events(){
echo '<center><span style="color:FFFFFF">Comming Soon!';
}
function Quest(){
echo 'you have reached the quest section';
}
function profile(){
echo 'you have reached the profile section';
}
function Communications(){
echo 'you have reached the communication section';
}
function Logout(){
$_SESSION = array(); // Assign a new array to session, overwriting all previous contents
session_destroy(); // Destroy the Session
header("Location: ../home.php"); // Return user to homepage
}
?>
Same thing. Something is still allowing the events() function to be called. When this line
else die('<center><span style="color:FFFFFF">what are you doing, you need to login first!');
should stop it