Re: [PHP] Session help please?

2004-04-01 Thread Chris Shiflett
--- Paul [EMAIL PROTECTED] wrote:
 I figured I could do something like $_SESSION['test'] = 5 and refer to
 $test on other pages however I cannot. The reason I thought I could do
 this is because I can do $_SESSION['test'] = $_POST['test'] and be able
 to refer to just $test on other pages.

This is because you probably have register_globals enabled, so the value
of test in the user POST request is available to you as both:

$_POST['test']

and

$test

It has nothing to do with you also setting $_SESSION['test'].

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Session Help

2002-01-30 Thread Kevin Stone

This is such an annoying thing.  And it seems as though no one is
willing to cover it in any manual, book or tutorial.  Apparently the
problem is that PHP sessions automatically set the no-cache header.  So
at the top of each script, after the session_start() function set
header(Cache-Control: public);  That will the trick.  Actually it may
work too well but at least your visitors won't get discouraged by that
annoying message.

--
Kevin Stone
[EMAIL PROTECTED]

 -Original Message-
 From: Michael: Dave II, Electric Boogaloo
[mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 29, 2002 3:47 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Session Help
 
 I'm having a little problem with my sessions on a website I'm
programming
 for.  After a user logs in, if that user follows a link, the variable
 information is being passed correctly, but when they hit Back,
Internet
 Explorer gives a Warning This Page Has Expired error.  Hitting
refresh
 does fix this, but Forward/Back is such a common procedure that I'd
like
 for this to work smoothly.  Could someone tell me what I'm doing wrong
 here?
 
 Thanks in advance.
 
 
 Michael
 
 
 
 --
 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] Session Help

2001-11-30 Thread Papp Gyozo


PHP automatically calls the appropiate function instead if you.
But consider that the save handler is not called on individual 
session_register functions, only when all output is gone, and 
the whole session - each registered variable - must be saved.

manual
Note: The write handler is not executed until after the output stream is closed. 
Thus, output from debugging statements in the write handler will never be seen in 
the browser. If debugging output is necessary, it is suggested that the debug output 
be written to a file instead. 
/manual

- Original Message - 
From: phantom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 10:10 AM
Subject: [PHP] Session Help


| I am trying to set my session data to be stored in MySQL so I am using
| session_set_save_handler() which sets the six user-level session storage
| functions (which I have already defined).
| 
| Will session_set_save_handler automatically run the appropiate storage
| function when required (like when i say session_register(Variable))
| --OR-- do I specifically have to run that function
| (mysql_sessions_write(SID,$Value))  from my script when I want to save
| info to the session table?
| 
| I would appreciate any scripts anyone might have that would illustrate
| how this works, the PHP manual and online examples I have found just are
| not cutting it.
| 
| Thank you.  [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]
|