I see lots of problems: First of all you should change the values you are storing to 1 or 0 instead of 'YES' or 'NO'. A 1 or 0 can be logically interpreted as Boolean TRUE/FALSE. Second, you should NOT be running queries in loops. Create one query to update the values. Third, there is no error handling on your query - so if there are errors you will never see them Fourth, you appear to be opening a new form for each checkbox - but never closing the form. If you have a closing form tag later in your script you would have only one valid for that would include only the last checkbox. Fifth, you are not creating the form fields as an array, but your processing code is trying to process them as an array Sixth, the values in your DB are YES or NO, but you are trying to update the value to 0 or 1.
Be concious that an unchecked checkbox is going to deliver nothing back to your backend PHP form handler, in a POST situation then: here is a simple way of describing the form handling. PHP: Get Values of Multiple Checked Checkboxes Neeraj Agarwal In our previous tutorials, we have performed various operations on different form elements using Javascript and jQuery.
I'm sure there are other problems I do not see. Hp Service Manuals Pdf. There is a VERY easy way to do this - will respond momentarily with some code.
Yes that was my first idea: one row per value. I was trying to attack this problem in steps that I can handle: first->get to see if I can actually get values out of my form to the database: That was done ok. The second step was to get the values into the column. That was done also. Now I am at trying to not implode the values and insert the values in a separate row for each. Next I have o attack how I can transfer the id number of the last form that was submited so I can reference it into this form that I am building. Hp 930c Driver For Windows 7.
I'm just not too familiar with php yet. But learning everyday. I found that if I break the task in little piece that I can handle one at the time, I sometime get lucky and able to do what I want to do without too much problem. This is where I am at the moment ->getting these values into a separate row and then figure out how to pass the ID of the last transaction on hte previous page so I can reference it in this current form. Thank you StarLion.
What I done is I used the alternative you gave me as a second option. That worked wonderfully, thank you.
I kept the method you wrote and saved it as insertArray, so I can use it when I need it. All this is very new to me especially pdo which I just started a couple of weeks ago. So in time I will make sense of all the ehlp I get from this wonderful forum and start seeing how I can utilize everything that is shown to me. Right now, it's baby steps trying to make things work first and then get things tighter and better. So what I did for validation I used trim, escape and tested for is_numeric.
Since it will always be nothing but id number and only have one field I think I should be ok, right? Good idea, I will add that to the validation, thanks. While I have you, can I impose another question? I need one more field populated in a hidden input field. Free Download Reset Printer Epson T13x. I want to pass the firesafetyID of the previous form that was inserted in the database prior to be redirected to this attendance form where I will check whomever participated in the fire drill(which is kept into a separate table but want to bring a foreign key inside this attendance for that I am inserting?
I know I can either do it by the url with a $_get or maybe through $session. Which would be the best to use?
I;m learning both not sure which would be best at this time.