RE: [PHP] Session var read by form C++ CGI prog ?
| From: | Ford, Mike [LSS] | Date: | Tue, 02 Sep 2003 18:32:22 +0000 |
| Subject: | RE: [PHP] Session var read by form C++ CGI prog ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-161459@lists.php.net to get a copy of this message | ||
On 02 September 2003 19:22, Raditha Dissanayake wrote:
> Hi,
>
> Had a similar problem when building upload progress bar. Initially i
> used cookies but that had a few minor hiccups. What you can do is to
> encode your variables into the query string. This is
> accessible as part
> of the env. variables. Since you are familiar with C++ you
> will get the
> hang of PHP very quickly.
>
> oh and btw the correct way to set a cookie is with
> session_register(),
> $_SESSION is used for retrieval.
Er, nope. If you have a version of PHP with the $_SESSION array, then you use it for both setting
*and* retrieving -- session_register() and friends should *not* be used in this case. (Indeed,
there are circumstances where the combination of session_register() with $_SESSION gives broken
behaviour.)
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211