the session not working with me this morning ,I don’t know why
look at the code:
<?php ob_start();
session_start();
?>
<html xmlns='http://www.w3.org/1999/xhtml'>
<body>
<div class='container'>
<div class='header'>
<img src='../pictures/logo.png' />
</div>
<div class='corps' dir='rtl'>
<?php
include '../config/configdb.php';
include '../api/usersapi.php';
if(isset($_POST['user']) && $_POST['user'] == 'login'){
$username = strip_tags($_POST['username']);
$password = strip_tags(sha1($_POST['password']));
if($username && $password){
$getuser = tutofilter_users_get("WHERE `username` = '$username' AND `password` = '$password'");
if($getuser == NULL)
echo 'no member with this name ';
else{
foreach($getuser as $user):
$uname = $user->username;
$upass = $user->password;
if($username == $uname && $password == $upass):
$tname = $_SESSION['tname'];
$tpass = $_SESSION['tpass'];
echo "welcome $tname to your controll panel<a href='profile.php'>go to your profile</a>";
else:
die('login failed');
endif;
endforeach;
}
} }
?>
</div>
</div>
the result in profile.php : welcome to your controll panel go to your profile
the problem is the variables $tname and $tpass do not stock any session in the login
help me please