|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-15 20:31 UTC] sniper@php.net
[2002-04-15 20:48 UTC] scoutt at webspaz dot net
[2002-04-16 06:12 UTC] sniper@php.net
[2002-04-17 00:20 UTC] scoutt at webspaz dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 20:00:02 2025 UTC |
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. }