Re: [PHP] Lost session variables still confounding me

2004-11-04 Thread Daniel Kullik
Stuart Felenstein wrote: --- Jason Wong <[EMAIL PROTECTED]> wrote: 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

Re: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- Jason Wong <[EMAIL PROTECTED]> wrote: > 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 h

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 04 November 2004 12:08, Stuart Felenstein wrote: > --- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > > Page 3: > > > >if (count($myarray) > 5): > > $_SESSION['arrayerr'] =

Re: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Jason Wong
On Thursday 04 November 2004 12:08, Stuart Felenstein wrote: > --- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > > Page 3: > > > >if (count($myarray) > 5): > > $_SESSION['arrayerr'] = "you have selected too > > many industries"; > > session_write_close(); > > header ("Location: Pa

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- "Ford, Mike" <[EMAIL PROTECTED]> 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

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 04 November 2004 11:37, Stuart Felenstein wrote: > --- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > > > > Page3: > > > > > > if (count($LurkerIndustry) > 5) { > > > $_SESSION['arr

Re: Re[4]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- Richard Davey <[EMAIL PROTECTED]> wrote: > Try sticking this on Page 2 (ensure you have a > session_start() at the > top of the page and that you replace the 'var' text > below with the > correct ones. > > if (isset($_POST['var'])) > { >echo 'POST value found, setting the session var > n

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > > Page3: > > > > if (count($LurkerIndustry) > 5) { > > $_SESSION['arrayerr'] = "you have selected too > many industries"; > > $_SESSION['f1a'] = $_POST['ListingName']; > > header ("Location: TestMulti2.php"); > > exit; > > } > > Well, that's even wo

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 04 November 2004 10:56, Stuart Felenstein wrote: > --- Reinhart Viane <[EMAIL PROTECTED]> wrote: > > > Suppose Richard means: > > > > If (isset($_POST['ListingName'])) { > > $_

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- Reinhart Viane <[EMAIL PROTECTED]> wrote: > So, if I understand correct, even with the isset > code on the second page > $_SESSION['f1a'] is set to empty? > That's strange. > Still I wonder why you are inputting the error > messages and the redirect > in a session variable. > Yes, the isset

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 04 November 2004 10:20, Stuart Felenstein wrote: > --- Richard Davey <[EMAIL PROTECTED]> wrote: > > > Before setting the session value in Page 2, check > > for the existence of

Re[4]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Richard Davey
Hello Stuart, Thursday, November 4, 2004, 10:55:42 AM, you wrote: SF> The variable is alive with any of the code including the one I had SF> originally. It seems to do a reset though when it's redirected. SF> $_SESSION['f1a'] = $_POST['ListingName']; This won't have any effect if you don't actu

Re[4]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Richard Davey
Hello Stuart, Thursday, November 4, 2004, 10:20:04 AM, you wrote: >> if (isset($_POST['var'])) >> { >>$_SESSION['var'] = $_POST['var']; >> } >> >> When you now redirect to Page 2 upon an error, it'll >> skip this block >> because the $_POST var won't exist. SF> I'm a bit confused, this fixe

RE: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- Reinhart Viane <[EMAIL PROTECTED]> wrote: > Suppose Richard means: > > If (isset($_POST['ListingName'])) { > $_SESSION['f1a'] = $_POST['ListingName']; > } Right, I've tried all three variations , none of which, I'm sorry to report, have helped. The variable is alive with any of the code i

Re: Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- Richard Davey <[EMAIL PROTECTED]> wrote: > Before setting the session value in Page 2, check > for the existence of > the $_POST value first. > > if (isset($_POST['var'])) > { >$_SESSION['var'] = $_POST['var']; > } > > When you now redirect to Page 2 upon an error, it'll > skip this blo

RE: [PHP] Lost session variables still confounding me

2004-11-04 Thread Reinhart Viane
: Richard Davey; [EMAIL PROTECTED] Subject: Re: [PHP] Lost session variables still confounding me --- Richard Davey <[EMAIL PROTECTED]> wrote: > Unless I'm mistaken - you are redirecting back to > Page 2 upon an > error, right? Well according to the code posted, the > second you

RE: [PHP] Lost session variables still confounding me

2004-11-04 Thread Reinhart Viane
e- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: donderdag 4 november 2004 11:03 To: Richard Davey; [EMAIL PROTECTED] Subject: Re: [PHP] Lost session variables still confounding me --- Richard Davey <[EMAIL PROTECTED]> wrote: > Unless I'm mistaken - you are redirecting bac

Re[2]: [PHP] Lost session variables still confounding me

2004-11-04 Thread Richard Davey
Hello Stuart, Thursday, November 4, 2004, 10:02:53 AM, you wrote: SF> Your not mistaken. That is what's happening. I just don't know how SF> to fix it . Before setting the session value in Page 2, check for the existence of the $_POST value first. if (isset($_POST['var'])) { $_SESSION['var']

Re: [PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
--- Richard Davey <[EMAIL PROTECTED]> wrote: > Unless I'm mistaken - you are redirecting back to > Page 2 upon an > error, right? Well according to the code posted, the > second you hit > Page 2 again, you are over-writing whatever is in > the f1a session > variable with the contents of the $_POS

RE: [PHP] Lost session variables still confounding me

2004-11-04 Thread Reinhart Viane
>>Page 1: >>//Start the Session - begin Block >>@session_start(); >> >>>/> Is it necesarry to start the session here? Maybe it is if they have to be logged in or something Normally I only start the session when I indeed can assign some session variables in the same page >>Page 2: >>//Start the Se

[PHP] Lost session variables still confounding me

2004-11-04 Thread Stuart Felenstein
I think I've tried just about everything that I found googling. Still no luck. I'm throwing this out again, with the chance that something missed before maybe noticed. Page 1: //Start the Session - begin Block @session_start(); Page 2: //Start the Session - begin Block @session_start(); //Set

Re: [PHP] Lost session variables still confounding me

2004-11-04 Thread Richard Davey
Hello Stuart, Thursday, November 4, 2004, 9:38:44 AM, you wrote: SF> Page 2: SF> $_SESSION['f1a'] = $_POST['ListingName']; SF> Page 3: SF> if (count($myarray) > 5) { SF> $_SESSION['arrayerr'] = "you have selected too many SF> industries"; SF> header ("Location: Page2.php"); SF> exit; SF> } SF>