Hi,
I got some code that checks to see if a checkbox has been checked - the form itself is built up dynamically.
It works fine but if the user presses 'submit' without checking a box then it knackers up the foreach statement (with a Warning: Invalid argument supplied for foreach() ) because the checkbox array doesn't become an array until there's at least one box checked (or so my experimenting seems to indicate).
I could place an '@' in front of foreach but that seems a bit scruffy.
Does anyone have a better suggestion?
Thanks in advance
Chris