Re: [PHP] is this syntax correct?

2001-04-05 Thread Plutarck

session_unregister must take the name of the variable to kill. So:

session_unregister("test");

does the job.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Jacky@lilst"" <[EMAIL PROTECTED]> wrote in message
008701c0be0f$21dd1de0$[EMAIL PROTECTED]">news:008701c0be0f$21dd1de0$[EMAIL PROTECTED]...
> I have setup session here
>   global $test;
>  $test = "foo";
>  session_register("test");
> ?>
>
> and newbie as I am, still don't know how to delete value of this, I
actually
> using this right at the bottom of the page where I want session value to
be
> deleted.
>  session_unset();
> ?>
> Did not work, of course, so what do I do?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> - Original Message -----
> From: Wade Halsey <[EMAIL PROTECTED]>
> To: Jacky@lilst <[EMAIL PROTECTED]>
> Sent: Monday, April 02, 2001 3:48 AM
> Subject: Re: [PHP] is this syntax correct?
>
>
> > do you have
> > session_start();
> >  at the top of the next page?
> >
> > - Original Message -
> > From: Jacky@lilst <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, April 02, 2001 10:43 PM
> > Subject: Re: [PHP] is this syntax correct?
> >
> >
> > > I also tried this syntax:
> > >  > > global $test;
> > > $test = "foo";
> > > session_register("test");
> > > ?>
> > >
> > > and it still not work as when I go to next page, and try echo $test,
> > nothing
> > > come up.
> > > Jack
> > > [EMAIL PROTECTED]
> > > "There is nothing more rewarding than reaching the goal you set for
> > > yourself"
> > > - Original Message -
> > > From: Joseph Bannon <[EMAIL PROTECTED]>
> > > To: Jacky@lilst <[EMAIL PROTECTED]>
> > > Sent: Monday, April 02, 2001 3:44 AM
> > > Subject: RE: [PHP] is this syntax correct?
> > >
> > >
> > > > > So what is the right way to do?
> > > >
> > > >
> > > > I resent my email to the list. I've done mostly DB work, so I need
to
> > know
> > > > what those functions do.
> > > >
> > > > J
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General 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]
> > >
> > >
> >
> >
> >
>
>
> --
> PHP General 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]
>



-- 
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-05 Thread [EMAIL PROTECTED]

I have setup session here


and newbie as I am, still don't know how to delete value of this, I actually
using this right at the bottom of the page where I want session value to be
deleted.

Did not work, of course, so what do I do?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Wade Halsey <[EMAIL PROTECTED]>
To: Jacky@lilst <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 3:48 AM
Subject: Re: [PHP] is this syntax correct?


> do you have
> session_start();
>  at the top of the next page?
>
> - Original Message -
> From: Jacky@lilst <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 02, 2001 10:43 PM
> Subject: Re: [PHP] is this syntax correct?
>
>
> > I also tried this syntax:
> >  > global $test;
> > $test = "foo";
> > session_register("test");
> > ?>
> >
> > and it still not work as when I go to next page, and try echo $test,
> nothing
> > come up.
> > Jack
> > [EMAIL PROTECTED]
> > "There is nothing more rewarding than reaching the goal you set for
> > yourself"
> > ----- Original Message -
> > From: Joseph Bannon <[EMAIL PROTECTED]>
> > To: Jacky@lilst <[EMAIL PROTECTED]>
> > Sent: Monday, April 02, 2001 3:44 AM
> > Subject: RE: [PHP] is this syntax correct?
> >
> >
> > > > So what is the right way to do?
> > >
> > >
> > > I resent my email to the list. I've done mostly DB work, so I need to
> know
> > > what those functions do.
> > >
> > > J
> > >
> > >
> >
> >
> > --
> > PHP General 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]
> >
> >
>
>
>


-- 
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-04 Thread Plutarck

Re-arrange the code.



Always use session_register first, then follow it with assigning the
variable a value. May not be required in the future, but do it anyway for
clarity.

I don't think you need the global line at all. global is used inside of
functions and classes, not in an "non-nested" piece of code.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Jacky"" <[EMAIL PROTECTED]> wrote in message
004001c0bbb3$bada9080$[EMAIL PROTECTED]">news:004001c0bbb3$bada9080$[EMAIL PROTECTED]...
Hi all
is this syntax correct to work on session in php4?



but nest page when I call variable $test to echo it, nothing come up? what
did I do wrong?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"




-- 
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-02 Thread Yasuo Ohgaki

I think many users are confusing about PHP4 session.
I thought this info might be useful for someone.

There are 3 ways to start PHP4 session. (as far as I know)
1) Using php.ini:  "session.auto_start = 1" to automatically start session for
any request.
2) Using session_start(): Explicitly start PHP4 session with "session_start()"
3) Using session functions: Implicitly start PHP4 session with
"session_register()"

If you are having trouble with PHP4 session, set "error_reporting = E_ALL" in
php.ini.

Is there any other way to start PHP4 session?

Regards,
--
Yasuo Ohgaki


"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Jacky,
>
> basic thing about sessions: you need session_start() at the top of every
> page in which you expect to use them...check out zend.com for some
> tutorials...but yes, you do need it at the top of that page...
>
> -jack
> "Jacky@lilst" wrote:
> >
> > Not really, do I need to have session_start at the sender page and the
> > receiver page?
> > Jack
> > [EMAIL PROTECTED]
> > "There is nothing more rewarding than reaching the goal you set for
> > yourself"
> > - Original Message -----
> > From: Wade Halsey <[EMAIL PROTECTED]>
> > To: Jacky@lilst <[EMAIL PROTECTED]>
> > Sent: Monday, April 02, 2001 3:48 AM
> > Subject: Re: [PHP] is this syntax correct?
> >
> > > do you have
> > > session_start();
> > >  at the top of the next page?
> > >
> > > - Original Message -
> > > From: Jacky@lilst <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, April 02, 2001 10:43 PM
> > > Subject: Re: [PHP] is this syntax correct?
> > >
> > >
> > > > I also tried this syntax:
> > > >  > > > global $test;
> > > > $test = "foo";
> > > > session_register("test");
> > > > ?>
> > > >
> > > > and it still not work as when I go to next page, and try echo $test,
> > > nothing
> > > > come up.
> > > > Jack
> > > > [EMAIL PROTECTED]
> > > > "There is nothing more rewarding than reaching the goal you set for
> > > > yourself"
> > > > - Original Message -
> > > > From: Joseph Bannon <[EMAIL PROTECTED]>
> > > > To: Jacky@lilst <[EMAIL PROTECTED]>
> > > > Sent: Monday, April 02, 2001 3:44 AM
> > > > Subject: RE: [PHP] is this syntax correct?
> > > >
> > > >
> > > > > > So what is the right way to do?
> > > > >
> > > > >
> > > > > I resent my email to the list. I've done mostly DB work, so I need to
> > > know
> > > > > what those functions do.
> > > > >
> > > > > J
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > PHP General 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]
> > > >
> > > >
> > >
> > >
> > >
> >
> > --
> > PHP General 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]
>
> --
> PHP General 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]
>


-- 
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-02 Thread Jack Dempsey

Jacky,

basic thing about sessions: you need session_start() at the top of every
page in which you expect to use them...check out zend.com for some
tutorials...but yes, you do need it at the top of that page...

-jack
"Jacky@lilst" wrote:
> 
> Not really, do I need to have session_start at the sender page and the
> receiver page?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> - Original Message -
> From: Wade Halsey <[EMAIL PROTECTED]>
> To: Jacky@lilst <[EMAIL PROTECTED]>
> Sent: Monday, April 02, 2001 3:48 AM
> Subject: Re: [PHP] is this syntax correct?
> 
> > do you have
> > session_start();
> >  at the top of the next page?
> >
> > - Original Message -
> > From: Jacky@lilst <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, April 02, 2001 10:43 PM
> > Subject: Re: [PHP] is this syntax correct?
> >
> >
> > > I also tried this syntax:
> > >  > > global $test;
> > > $test = "foo";
> > > session_register("test");
> > > ?>
> > >
> > > and it still not work as when I go to next page, and try echo $test,
> > nothing
> > > come up.
> > > Jack
> > > [EMAIL PROTECTED]
> > > "There is nothing more rewarding than reaching the goal you set for
> > > yourself"
> > > - Original Message -
> > > From: Joseph Bannon <[EMAIL PROTECTED]>
> > > To: Jacky@lilst <[EMAIL PROTECTED]>
> > > Sent: Monday, April 02, 2001 3:44 AM
> > > Subject: RE: [PHP] is this syntax correct?
> > >
> > >
> > > > > So what is the right way to do?
> > > >
> > > >
> > > > I resent my email to the list. I've done mostly DB work, so I need to
> > know
> > > > what those functions do.
> > > >
> > > > J
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General 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]
> > >
> > >
> >
> >
> >
> 
> --
> PHP General 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]

-- 
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-02 Thread Christian Reiniger

On Monday 02 April 2001 10:44, you wrote:
> What does global and session_register do?

RTFM

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 3600 hosts for known problems in 3 weeks

--
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-02 Thread Christian Reiniger

On Monday 02 April 2001 22:30, you wrote:
> Hi all
> is this syntax correct to work on session in php4?
>
>  global $test;
> $test = "foo";
> session_register("$test");
> ?>
>
> but nest page when I call variable $test to echo it, nothing come up?
> what did I do wrong? Jack

Use session_start();

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 3600 hosts for known problems in 3 weeks

--
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-02 Thread [EMAIL PROTECTED]

Not really, do I need to have session_start at the sender page and the
receiver page?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Wade Halsey <[EMAIL PROTECTED]>
To: Jacky@lilst <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 3:48 AM
Subject: Re: [PHP] is this syntax correct?


> do you have
> session_start();
>  at the top of the next page?
>
> - Original Message -
> From: Jacky@lilst <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 02, 2001 10:43 PM
> Subject: Re: [PHP] is this syntax correct?
>
>
> > I also tried this syntax:
> >  > global $test;
> > $test = "foo";
> > session_register("test");
> > ?>
> >
> > and it still not work as when I go to next page, and try echo $test,
> nothing
> > come up.
> > Jack
> > [EMAIL PROTECTED]
> > "There is nothing more rewarding than reaching the goal you set for
> > yourself"
> > - Original Message -
> > From: Joseph Bannon <[EMAIL PROTECTED]>
> > To: Jacky@lilst <[EMAIL PROTECTED]>
> > Sent: Monday, April 02, 2001 3:44 AM
> > Subject: RE: [PHP] is this syntax correct?
> >
> >
> > > > So what is the right way to do?
> > >
> > >
> > > I resent my email to the list. I've done mostly DB work, so I need to
> know
> > > what those functions do.
> > >
> > > J
> > >
> > >
> >
> >
> > --
> > PHP General 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]
> >
> >
>
>
>


-- 
PHP General 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]




Re: [PHP] is this syntax correct?

2001-04-02 Thread [EMAIL PROTECTED]

I also tried this syntax:


and it still not work as when I go to next page, and try echo $test, nothing
come up.
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Joseph Bannon <[EMAIL PROTECTED]>
To: Jacky@lilst <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 3:44 AM
Subject: RE: [PHP] is this syntax correct?


> > So what is the right way to do?
>
>
> I resent my email to the list. I've done mostly DB work, so I need to know
> what those functions do.
>
> J
>
>


-- 
PHP General 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]




RE: [PHP] is this syntax correct?

2001-04-02 Thread Joseph Bannon

What does global and session_register do?


J





Say I'm Hot! - Post Your Picture!
http://www.sayimhot.com

-- 
PHP General 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]