eeijlar
07-27-2008, 11:28 PM
How do I get the value of a check box in php, as in, see if it is checked or not?
This is the html:
<input type="checkbox" id="form_n_screen" name="screen_chkbox_n"/
I am using the following code to see if the box is checked:
// validate the chkbox
$this->screen_chkbox_n = $request->getPost('screen_chkbox_n');
if (!this->screen_chkbox_n){
$this->addError('checkbox', 'Please select an option above');
}
screen_chkbox_n is always blank... any ideas?
This is the html:
<input type="checkbox" id="form_n_screen" name="screen_chkbox_n"/
I am using the following code to see if the box is checked:
// validate the chkbox
$this->screen_chkbox_n = $request->getPost('screen_chkbox_n');
if (!this->screen_chkbox_n){
$this->addError('checkbox', 'Please select an option above');
}
screen_chkbox_n is always blank... any ideas?