Re: Re[2]: [PHP] Lost session variables still confounding me
| From: | Jason Wong | Date: | Thu, 04 Nov 2004 20:59:01 +0000 |
| Subject: | Re: Re[2]: [PHP] Lost session variables still confounding me | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201161@lists.php.net to get a copy of this message | ||
On Thursday 04 November 2004 12:08, Stuart Felenstein wrote:
> --- "Ford, Mike" <M.Ford@leedsmet.ac.uk> wrote:
> > Page 3:
> >
> > if (count($myarray) > 5):
> > $_SESSION['arrayerr'] = "you have selected too
> > many industries";
> > session_write_close();
> > header ("Location: Page2.php?".SID);
> > exit;
> > endif;
> >
> > Hope this helps.
>
> Mike, once again you've come through. This worked!
> But , let me ask, can it have anything to do with the
> endif ? I asked becasue I tried the
> session_write_close and the SID before with no
> success. Now that it's working , the only thing
> different is the endif; .
Are you saying that before you did not have the line "endif;"? AFAICS that
would result in a parse error. Maybe what you had before was:
if (count($myarray) > 5)
$_SESSION['arrayerr'] = "you have selected too many industries";
session_write_close();
header ("Location: Page2.php?".SID);
exit;
And yes that has a totally different behaviour to the code with the "endif;"
construct.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Consultation, n.:
Medical term meaning "to share the wealth."
*/