|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-11-25 14:11 UTC] aelaron at yahoo dot com
When I log in with IIS it does not create my session I have to log out and then log back in to have my session start. I installed Apache on Win2k server and it works fine first time around. Any ideas on why this is? All my updates and service paks are up to date on IIS, Internet Explorer, and Win2k thanks, Dustin PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 03:00:02 2025 UTC |
Hey iliaa, I am using the bleow code, I do believe it would be a user session. function dbconnect() { include("config.php"); mysql_connect($dbhost, $dbusername, $dbpassword); mysql_select_db("$dbname") or die ("Unable to select database"); } dbconnect(); if(!isset($op)) $op = "login"; switch ($op) { case "logout": $username = 0; session_start(); session_unregister("username"); header("Location:login.php?op=logout"); break; case "login": $results = mysql_query("select * from auth where username='$username' and password=password('$password')"); if (mysql_num_rows($results)>0) { session_start(); session_register("username"); header("Location:functions.php?op=chpass"); } else header("Location:login.php?op=BadLogin"); break; } Any help you can suggest would be great. Like I said it works fine first time around with apache but not with IIS you have to log out and then log back in to get it to work. I tell you what I will create a user for you so you can see. You can log in at the address below: http://216.150.211.253/phpfiles/login.php username guest password guest1 Thanks AelaronHi again, I am confused on what your suggesting I appreciate your patience. You mentioned to use $_SESSION autoglobal but in what syntex? I am using session_register("username"); do I change it to $_SESSION autoglobal("username");? Thanks Dustin