I have a form in which there is a table that displays a list from the MySQL with checkboxes to each displayed name. I have to make a selection out from the list by checking some the checkboxes all may be all the checkboxes in some circumstances.
A. I have to validate the selection made
B. I have to store the value of the selected checkboxes into an array
I need assistance as I do not know how and what to validate against for the checkboxes.
It may help to see what is being passed in the POST array when you click the next button. I would throw the following code in where you have your comment for creating a new array with the checked ID's:
Now, I'm totally guessing and making these numbers up, but you should have the array of checked values right in your $_POST['dname'] array. Then you can loop through them and validate each ID or whatever it is you want to do with 'em.
What I have to do with the finally accumulated array is to use the 'emp_no' query the database and then pick their calendar for a specific date and then search for a specified time. This search should inform who is busy and who is free at the said time.
I updated the code with the update above, I seem not to get the values of the 'emp_no' - it has gotten me confused, may be I am not doing something right. this is how the code looks now:
i checked your code...
why are you using checkbox code in echo statement...thats why the problem raises...
use it as html code..
here is update code...that database belongs to my table..please change your database values accordingly...
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.