PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm currently working on pulling a data from a form did a few tests and realized my method of pulling data from a checkbox list is ...well..not working. Simply put its never going into the loop to check the values at all.
ok I must be stupid or something how on earth do you pull a value out of it once you have it in an array format how do you pull anything from it do you just use.
and do a foreach like normal to loop through it. do you need to put as value beside it. I'm sorry just finding ANY information on PhP lately has been an absolute horror everyone has a billion guides that do things in a totally obscure way or are so completly sytactically wrong that its just painful to read .
dont mind the prints their just an attempt at debugging as I cant simply step through the code which is majorly annoying :/. For some reason if I take this part out of the foreach loop.
it never finds the the answer correct regardless but if I put it inside the foreach loop it counts every checkbox that is checked as correct which is completely wrong.
the problem is with most examples I"m wanting to do something a slight bit more complicated than just echoing a response though thats a great thing for testing purposes. I need to check the value because it can be either 1 or 0. If its 1 I need it to increase the answer counter that way I can check later on in the script to see if the total number of answers matches the correct number of responses calculated and stord in $_SESSION["numcount"].
Frankly this programs almost a bit much for me given I started learning PHP to specifically do this project and I feel like I'm having to scrape and scrouge to get even the smallest of functions to work due to the very poor documentation on the language itself.