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
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,
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 (($iss
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']) && ($array['
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']) && ($array['
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'
[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
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: dvdmandt¤
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.
Tom Rawson wrote:
I have many places where I use references like this:
if ($fields['flags']['someflag']) ...
or perhaps
if ($_POST['checkboxfieldname']) ...
if (isset($_POST['checkboxfieldname'])) {
/** do stuff */
}
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/
10 matches
Mail list logo