php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16625 isset not working
Submitted: 2002-04-15 15:43 UTC Modified: 2002-04-17 00:20 UTC
From: scoutt at webspaz dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.1.2 OS: win98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scoutt at webspaz dot net
New email:
PHP Version: OS:

 

 [2002-04-15 15:43 UTC] scoutt at webspaz dot net
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.
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-15 20:31 UTC] sniper@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-04-15 20:48 UTC] scoutt at webspaz dot net
it is not bogus and I didn't want help. I was telling you guys there is a bug and that is what happens. they both should work on any platform as they have in the past.

I added the code I used and to tell you guys about it. my post is no different than anybody elses post.
 [2002-04-16 06:12 UTC] sniper@php.net
Try 4.2.0RC4 from http://www.php.net/~derick/ and remember
to replace the php4ts.dll with the one found in that package.

 [2002-04-17 00:20 UTC] scoutt at webspaz dot net
yes that fixed it and thank you. so it was a bug because I didn't change my code at all, just updated php, hmmmm go figure. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 15:01:33 2024 UTC