I am wanting to create an online attendance sheet that would allow users to log on and use check boxes or option buttons for twelve weeks corresponding to wk1, wk2, wk3, etc... I have no problem retrieving the members of the group (records from db) but do not know how to build the controls based off of a variable number of members. I am working with PHP and MySQL. Any help or pointing in the correct direction is appreciated!
TheIdiot
0
Newbie Poster
Recommended Answers
Jump to PostThe distinctive feature of the controls is their html property "name". Build the names as unique strings using the group member IDs, so that your controls have names like
cb1_1, cb_1_2, cb2_1, cb2_2
and so on. Then on the receiving side walk through the $_POST array and check each …
Jump to PostThat's what a programming language is for: automating tasks.
Write a PHP script which sets up your input HTML page with all the controls you need. E.g. along the following lines:$groups = mysql_query('SELECT * FROM groups'); while ($group = mysql_fetch_array( $groups )) { $groupId = $group['id']; …
Jump to PostDetails:
Using PHP / MySQL to create an attendance list.
All group members show up at the same time so one person can enter attendance.
All courses are 12 weeks long.Information / Thoughts:
…
I know from personal experience rechecking check boxes can be a pain in the behind.
Jump to PostWhat this code is doing is manipulating the results you are getting from your Query with PHP. There is no need to change the actual queries you run on the server.
What the implode command does is take an array and turn it into plain text.
So if you …
All 13 Replies
smantscheff
265
Veteran Poster
TheIdiot
0
Newbie Poster
smantscheff
265
Veteran Poster
TheIdiot
0
Newbie Poster
shdwmage
2
Newbie Poster
TheIdiot
0
Newbie Poster
shdwmage
2
Newbie Poster
shdwmage
2
Newbie Poster
smantscheff
commented:
Not only helpful, but also very detailed.
+1
TheIdiot
0
Newbie Poster
shdwmage
2
Newbie Poster
TheIdiot
commented:
Great help and very thorough!
+1
shdwmage
2
Newbie Poster
TheIdiot
0
Newbie Poster
shdwmage
2
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.