Hi, Friday, January 10, 2003, 4:25:00 AM, you wrote: JEO> Hi
JEO> HELP!!! JEO> I have read through the manual about using $_POST['<name>'] to retrieve JEO> data from forms, but what happens when a form element is not filled in JEO> or checked? JEO> If I have a checkbox on a form called "chk1" I get an error from PHP JEO> when I try this: JEO> $chk1 = $_POST['chk1']; // error if user did not chech the checkbox on JEO> the form!!! JEO> How do ya usefully retrieve the fact that a form element has not been JEO> filled in/checked? JEO> Be Well, JEO> John-Erik Omland JEO> ==================================== JEO> "Rhythm is the basis of life, JEO> not steady forward progress. JEO> The forces of creation, destruction, and preservation JEO> have a whirling, dynamic interaction." JEO> - Kabbalah Do it like this: $chk1 = (isset($_POST['chk1']))? $_POST['chk1'] : 'No'; replace 'No' with whatever you want for an unchecked box -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php