Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-10-2009, 05:59 AM   PM User | #1
macwiz
Regular Coder

 
Join Date: Jul 2008
Posts: 195
Thanks: 3
Thanked 11 Times in 11 Posts
macwiz is on a distinguished road
Set Checkbox State

OK. I need help please. My setup is so:
I have 3 SQL tables, a students table, with a column for either of their 8 classes, and a username column. the username is how i track users and the classes column is filled with the Class_ID when the user is added to the class. My second table is the Classes table. it contains a class_id column and a period column (there are 8 periods in the day, A1-A4, B1-B4). My third table is the teachers table that stores the Teacher_Username as well as a column for each of their periods, populated with the appropriate class_id

To add a student to a class, the Class_ID is placed into that students row in their appropriate period.

I need to add users, but I can't figure out the checkboxes (I manually added some test users). The page lists all students and a check box next to the user to change their class membership. the form page before it sets the current period and teacher_username.

I have queries to get the correct class_id by teacher_username and period from the teachers table, as well as to get the student username and period to be added to. (NOTE: A user is in the class when their period column value equals that of the Class_ID for that class).

What I need is if the user is in the class, the box is already checked. If they are not in the class, the box is unchecked, each student has a checkbox... Can anyone help me on this? Would my current code help?

Thanks so much!
__________________
-MacWiz1220
Science fiction does not remain fiction for long. And certainly not on the Internet.
-Vinton Cerf: Chief Internet Evangelist for Google and co-creator of the TCP/IP Internet Protocol Suite

Last edited by macwiz; 07-10-2009 at 07:00 AM..
macwiz is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:20 AM.


Advertisement
Log in to turn off these ads.