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['arrayerr'] = "you have selected too many industries";
> > > $_SESSION['f1a'] = $_POST['ListingName'];
> > > header ("Location: TestMulti2.php");
> > > exit;
> > > }
> > 
> > Well, that's even worse -- because page3 can *never* be reached as
> > the result of submitting a form, its $_POST[] will
> > *always* be empty -- so this
> > assignment is also bound to set $_SESSION['f1a'] to NULL.
> > 
> Mike, I'll heed your advice, since you haven't let me
> down before :).  But the variable lasts , I echo it on
> every page, including page6 where it's transacted into
> the database.  I'm not sure why you say that

Well, I would expect it to persist in your success route, since you're not
doing any destructive assignments.  However, I'm talking about your failure
route here, and with this extra assignment in place, every time that test
fails you are 100% guaranteed to destroy the value of $_SESSION['f1a']
before redirecting.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

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

Reply via email to