Michael Sims wrote:
Jochem Maas wrote:
[EMAIL PROTECTED] wrote:
If one must check the value and not just the existence of the
checkbox entry, or for other uses, e.g. where a flag may or may not
be present, one is saddled with clumsy constructs like:
if (($isset($array['index'])
Michael Sims wrote:
Jochem Maas wrote:
[EMAIL PROTECTED] wrote:
If one must check the value and not just the existence of the
checkbox entry, or for other uses, e.g. where a flag may or may not
be present, one is saddled with clumsy constructs like:
if (($isset($array['index'])
Burhan Khalid wrote:
Michael Sims wrote:
[EMAIL PROTECTED] wrote:
If one must check the value and not just the existence of the
checkbox entry, or for other uses, e.g. where a flag may or may not
be present, one is saddled with clumsy constructs like:
if (($isset($array['index'])
Jochem Maas wrote:
Michael Sims wrote:
On a controller page (the C in MVC) that handles form submissions
I create an array which defines what form variables are available
and their default values if not entered. I then use array_merge()
to combine that array with $_POST (or $_GET, as the
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 26 January 2005 19:56, [EMAIL PROTECTED] wrote:
On 26 Jan 2005 Jason Barnett wrote:
if (isset($_POST['checkboxfieldname'])) {
/** do stuff */
}
Sorry, I should
On 26 Jan 2005 Jason Barnett wrote:
if (isset($_POST['checkboxfieldname'])) {
/** do stuff */
}
Sorry, I should have mentioned that I knew about using isset -- it
works OK for the checkbox example, though I'm not clear if this
behavior is specified and therefore will not change -- i.e.
I'm pretty sure you can rely on the fact that they are undefined if not
checked.. It's somewhere in the HTML or HTTP standard.. Also, the manual
page of empty() says it won't generate errors if the variable isn't set.. So
empty() is probably the best way to go then..
--
// DvDmanDT
MSN:
[EMAIL PROTECTED] wrote:
On 26 Jan 2005 Jason Barnett wrote:
if (isset($_POST['checkboxfieldname'])) {
/** do stuff */
}
Sorry, I should have mentioned that I knew about using isset -- it
works OK for the checkbox example, though I'm not clear if this
behavior is specified and therefore will
Jochem Maas wrote:
[EMAIL PROTECTED] wrote:
If one must check the value and not just the existence of the
checkbox entry, or for other uses, e.g. where a flag may or may not
be present, one is saddled with clumsy constructs like:
if (($isset($array['index']) ($array['index'] == 1)) ...
9 matches
Mail list logo