Re: [PHP] Re: error checking a null array

2005-08-02 Thread Jochem Maas
Jack Jackson wrote: I can only swear this to the entire list: Before I come here for help, each time, I echo and var_dump and print_r until, yes, I need a doctor. I did say give it a rest when you start bleeding ;-) So by the time I come here, it's not laziness or lack of looking in the

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Jack Jackson
g.gill wrote: From what I understand the simplest solution here would be to check to see if you have $_POST['cb'] in the first place. That would indicate if checkbox was selected or not. After, you have posted the form just do the following test. $check_box_exits = ((isset($_POST['cb']))?

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Jochem Maas
Jack Jackson wrote: g.gill wrote: From what I understand the simplest solution here would be to check to see if you have $_POST['cb'] in the first place. That would indicate if checkbox was selected or not. After, you have posted the form just do the following test. $check_box_exits

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Mark Rees
g.gill wrote: From what I understand the simplest solution here would be to check to see if you have $_POST['cb'] in the first place. That would indicate if checkbox was selected or not. After, you have posted the form just do the following test. $check_box_exits =

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Jack Jackson
Jochem Maas wrote: snip wtf are you smoking Jack? every checkbox that was checked will exist in the $_POST array set with the value you gave it (I alway set a chekcboxes value to 1 because the values mere existance in the submitted data indicates it's chevckbox was checked), if a checkbox

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Dotan Cohen
On 8/1/05, Jack Jackson [EMAIL PROTECTED] wrote: Jochem Maas wrote: snip wtf are you smoking Jack? every checkbox that was checked will exist in the $_POST array set with the value you gave it (I alway set a chekcboxes value to 1 because the values mere existance in the submitted

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Mark Rees
On 8/1/05, Jack Jackson [EMAIL PROTECTED] wrote: Jochem Maas wrote: snip wtf are you smoking Jack? every checkbox that was checked will exist in the $_POST array set with the value you gave it (I alway set a chekcboxes value to 1 because the values mere existance in the submitted data

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Jochem Maas
Jack Jackson wrote: Jochem Maas wrote: snip wtf are you smoking Jack? every checkbox that was checked will exist in the $_POST array set with the value you gave it (I alway set a chekcboxes value to 1 because the values mere existance in the submitted data indicates it's chevckbox was

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Jack Jackson
AAarg. Okay, thanks to all of you I've decided that any field name I need to see will be sent to $_SESSION['required_fields'] and basta. Then after the submit button is pressed, I am doing this: reset($_SESSION['required_fields']); foreach ($_SESSION['required_fields'] as $fieldname)

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Jochem Maas
Jack Jackson wrote: AAarg. Okay, thanks to all of you I've decided that any field name I need to see will be sent to $_SESSION['required_fields'] and basta. Then after the submit button is pressed, I am doing this: reset($_SESSION['required_fields']); reset is not required when using

Re: [PHP] Re: error checking a null array

2005-08-01 Thread Jack Jackson
I can only swear this to the entire list: Before I come here for help, each time, I echo and var_dump and print_r until, yes, I need a doctor. So by the time I come here, it's not laziness or lack of looking in the manual, it's head-swirling confusion infused with incompetence and a

Re: [PHP] Re: error checking a null array

2005-07-31 Thread Jack Jackson
David Robley wrote: Jack Jackson wrote: hi, I have checkboxes beging dynamically generated. to seperate tasks in error checking I have added he arrays not just to $_POST but to $_POST[cb] so names (derived from question numbers) are for example: $_POST[cb][7] A dump of $_POST would