Bug #16625 Updated: isset not working
| From: | sniper@php.net | Date: | Tue, 16 Apr 2002 00:31:04 +0000 |
| Subject: | Bug #16625 Updated: isset not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-5074@lists.php.net to get a copy of this message | ||
ID: 16625
Updated by: sniper@php.net
Reported By: scoutt@webspaz.net
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: win98
PHP Version: 4.1.2
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2002-04-15 15:43:32] scoutt@webspaz.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.
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16625&edit=1