im just wondering im trying to make a login script and save the variables into session but i dont know why it dont go properly
from php.ini
session.save_path = /home/sessions
so from my script its
$locationURL = $_SERVER["REQUEST_URI"];
$sql ="select * from users where username='$username' and password='$password'";
$makeQuery = new queryRecord( $sql );
$res = mysql_query ($makeQuery->sqlQry);
if(mysql_num_rows($res) >= 1){
while ( list ( $userIdT, $usernameT, $passwordT ) = mysql_fetch_row($res) ){
if( !isset( $_SESSION['UID'] )) { $_SESSION['UID'] = $userIdT; }
}
Header("Location:$locationURL");
} else {
Header("Location:$locationURL?error=Y");
}
ok now when im just going to print the record it do print the UID but if i use to set the session it goes directly to else i dont know the reason why can some 1 tell me whats wrong with the code?
thank you in advance