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 a totally different behaviour to
the code with the "endif;"
construct.
Yep, that is what I had. So, no parse error, but did
not work right either.
Stuart
So you just forgot some curly-braces then.
You'd write either
[code]
if (count($myarray) > 5) {
$_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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php