ID: 14880
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Summary: _SESSION will NOT automatically register it as a session
variable
Status: Open
Bug Type: Session related
Operating System: Debian 3.0 (Woody)
PHP Version: 4.1.0
New Comment:

<?
session_start();
$_SESSION["foo"] = "bar";

if (session_is_registered("foo") == FALSE){
  echo "foo is not registered<br>";
}else{
  echo $_SESSION["foo"];
}
?>

Previous Comments:
------------------------------------------------------------------------

[2002-01-05 21:52:19] [EMAIL PROTECTED]

<?
function func1(){
  echo "Set iVar<br>";
  $_SESSION["iVar"] = 8;
}
function func2(){
  echo "\$_SESSION[iVar] ".$_SESSION[iVar]."<br>";
}
session_start();

if ($_REQUEST["action"] != "page2"){
  func1();
}

func2();

if (session_is_registered("iVar") == FALSE){
  echo "iVar is not registered<br>";
}
echo "<a href='$PHP_SELF?action=page1'>page1</a><br>";
echo "<a href='$PHP_SELF?action=page2'>page2</a><br>";
?>

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14880&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to