Ok, I'll try to explain the problem with as much information as possible.
first the user enters his login/password in a form. So 2 variables are initialized
$login , $password.
in the required file I check in which table of the database are stored $login and $password.
So I have :
$password=$POST['password'];
$login=$POST['login'];
$result=mysql_query("select count(id) as total form table1 where login='".$login."' and password='".$password."'");
$row=mysql_fetch_array($result);
$num=$row['total'];
if($num==0){
/ Another query to check in another table /
}
else{
}
In both cases, different variables are initialized with another mysql_query to get informations about the user (such as firstname, lastname, etc).
As I saw that I couldn't get the values of those variables (initiliazed in the if{} ) in the main file, I tried to set a simple $toto variable, and check if I can get its value in the main file. But the result was the same.
I have already checked with an echo if the statement can be true (so if $num==0 ; which means that the $login and $password are not in the table1). So I'm sure the statement can be true, and though the variable $toto is initialized during the if{} , it's considered as unset in the main file.