|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-27 20:05 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 07:00:02 2025 UTC |
Description: ------------ System: Apache 2.0.58 PHP 5.1.4 Windows XP Pro SP2 PHP.ini changes: short_open_tag = On upload_tmp_dir = C:\php\uploadtemp session.save_path = "C:\php\sessions" Problem: Session variables not being passed. Reproduce code: --------------- <? session_start(); if (isset($_POST['username'])) { $_SESSION = $_POST; } if ($_SESSION['username'] != "myuser" OR $_SESSION['password'] != "mypass") { print "<form enctype=\"multipart/form-data\" method=\"post\" action=\"".$_SERVER['PHP_SELF']."\"> <input type=\"Text\" name=\"username\"><BR><input type=\"Password\" name=\"password\"><BR><input type=\"Submit\" value=\"Login\"> </form>"; die(); } ?> You are logged in!<BR> You will clear the $_SESSION variable by clicking <a href="<?=$_SERVER['PHP_SELF']?>">here</a>. Expected result: ---------------- Once logged in, the page should look identical before and after clicking the link. Actual result: -------------- Once logged in, clicking the link requires you to login again because the $_SESSION variable is not being passed.