This is a discussion on session problem within the PHP Language forums, part of the PHP Programming Forums category; this script don't work Script A: set session variable <?php class Page0A { function Page0A(){ $this->init(); $this-&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
this script don't work
Script A: set session variable <?php class Page0A { function Page0A(){ $this->init(); $this->save(); header("Location: page0b.php"); } function init(){ session_start(); } function save(){ global $_SESSION; $_SESSION["name"] = "fabio"; } } $p = new Page0A(); ?> Script B retrive variable <?php class Page0B{ function Page0B(){ $this->init(); $this->display(); } function init(){ session_start(); } function display(){ global $_SESSION; echo $_SESSION["name"]; } } $p = new Page0B(); ?> this NOT WORK for me ! i don't undestand! |