Re: Lost session variables still confounding me
| From: | Daniel Kullik | Date: | Thu, 04 Nov 2004 15:28:16 +0000 |
| Subject: | Re: Lost session variables still confounding me | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201179@lists.php.net to get a copy of this message | ||
Stuart Felenstein wrote:
--- Jason Wong <php-general@gremlins.biz> wrote:So you just forgot some curly-braces then. You'd write either [code] if (count($myarray) > 5) {Maybe what you had before was: if (count($myarray) > 5)Yep, that is what I had. So, no parse error, but did not work right either. Stuart$_SESSION['arrayerr'] = "you have selectedtoo 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.
$_SESSION['arrayerr'] = "you have selected too many industries";
session_write_close();
header ("Location: Page2.php?".SID);
exit;
}
[/code]
or
[code]
if (count($myarray) > 5):
$_SESSION['arrayerr'] = "you have selected too many industries";
session_write_close();
header ("Location: Page2.php?".SID);
exit;
endif;
[/code]
HTH, Daniel