[eluser]WoolyG[/eluser]
Hi all,
I have a checkbox with a value of 1 in my form:
Code:
<?php
$email_please = array(
'name' => 'email_please',
'id' => 'email_please',
'value' => '1',
'name' => set_checkbox('email_please', '1'),
);
echo form_checkbox($email_please);
?>
and in the target file I am grabbings its value:
Code:
$email_please = $_POST['email_please'];
.. but if the checkbox is not checked I'm getting an
Undefined index: email_please in my target file. Otherwise it sends "1" through.
Can someone point out what I'm doing wrong? Do I need to specify that the POST variable might be null, or not selected?
Thanks.
WoolyG