session_start();
if($_SESSION["user_id"] == NULL){header("Location: login.php");}
if(isset($_SESSION["user_id"])){
function inlogad(){
$user_ids = $_SESSION["user_id"];
$result = mysql_query("SELECT * FROM gtu_memb WHERE id = '$user_ids'");
for($i=0;$i<1;$i++){
$login = mysql_fetch_array($result);
echo"inloggad som: ".$login[0]." ".$login[1].".
";
}
}
echo"din information";
}
else {
function intlogin(){
echo"Du har inte loggat in. Logga in!";
echo"";
unset($_SESSION["user_id"]);
}
echo intlogin();
}