session problem

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-&...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-13-2005
Hywel
 
Posts: n/a
Default session problem

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!
Reply With Quote
  #2 (permalink)  
Old 01-13-2005
Erwin Moller
 
Posts: n/a
Default Re: session problem

Why do you post this question again?

Yesterday you posted the excact same question, and you received answers.

Regards,
Erwin Moller
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:18 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0