From:             [EMAIL PROTECTED]
Operating system: win98
PHP version:      4.1.2
PHP Bug Type:     Session related
Bug description:  isset not working

>From a simple login page to a members page works fine. writes teh session
variables no prob, but if you get redirected back to the memebers page the
if (isset($username)) doesn't work it goes right to the login page, even
thought the session still exist and you can echo the username to the
screen, but if you change it to if (isset($_SESSION['username']))  it
works just fine. now if I run that if statement on a *nix machine with the
same version of php (4.1.2) it will not work and I have to use the
isset($username) function.

win98se
apache 1.xx I can't remember
php 4.1.2 binaries

//if (isset($_SESSION['username'])) {
if (isset($username)){

    //if (!isset($_SESSION['passw2'])){
      if (!isset($passw2)){
        $pass = md5($pass);
        $sql = "select userid, name, pass from $usr_tbl where name =
'$username'";
        $result_check = mysql_query ($sql);
        $num_check =  mysql_num_rows($result_check);
              while ($row = mysql_fetch_array($result_check))
              {
              $name= $row["name"];
              $userid= $row["userid"];
              $passw2 = $row["pass"];
              }

              session_register('userid','username','passw2');
    }

//start members page here

}else{
//login page here.
}
-- 
Edit bug report at http://bugs.php.net/?id=16625&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16625&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16625&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16625&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16625&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16625&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16625&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16625&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16625&r=submittedtwice

Reply via email to