If( strcmp($voorraad[1],'on') == 0 )
// it's checked
else
// it's not
Alternatively, fix your HTML by using quotes and a value attribute:
INPUT TYPE=checkbox name=voorraad value=something checked
Then:
if ($voorraad=='something') {
// checked
}
- Colin
--
PHP General Mailing
Hey Colin,
You will need some javascript to handle the checkbox'
onchange event because when the user clicks the
checkbox off and back on, the value will be 'on' - and
your if-condition will not work!
Greetz,
Bjorn Van Simaeys
www.bvsenterprises.com
--- Colin Viebrock [EMAIL PROTECTED]
You will need some javascript to handle the checkbox'
onchange event because when the user clicks the
checkbox off and back on, the value will be 'on' - and
your if-condition will not work!
Uh, no.
INPUT TYPE=checkbox name=voorraad value=something checked
When you submit the form,
I've the following weird problem.
I have a form which contains an array with values of some checkboxes.
This is the HTML-part:
INPUT TYPE=checkbox name=voorraad checked
if checked or
INPUT TYPE=checkbox name=voorraad
Try INPUT TYPE=checkbox name=voorraad[] maybe...?
Jason
--
PHP
Sorry,
I've copied some old code.
It was already INPUT TYPE=checkbox name=voorraad[]
- Original Message -
From: Jason Murray [EMAIL PROTECTED]
To: 'Tijmen Hennink' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 06, 2001 10:37 AM
Subject: RE: [PHP] array + checkbox
I've
the
same output.
- Original Message -
From: Tijmen Hennink [EMAIL PROTECTED]
To: Jason Murray [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, August 06, 2001 10:40 AM
Subject: Re: [PHP] array + checkbox
Sorry,
I've copied some old code.
It was already INPUT TYPE=checkbox name=voorraad
Hey, what is the deal with those read receipts? Do you really what one from
every person that reads your messages?
-Original Message-
From: Tijmen Hennink [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 2:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] array + checkbox
Some
7 matches
Mail list logo