Jump to content


Photo

Give me some vision..

php html attendance table checkbox

Best Answer mac_gyver, 22 September 2013 - 09:17 AM

you are still showing a separate table for each different type of user and you have usernames stored in related tables, rather than using the user's id.

 

you were told two or three threads ago not to have separate tables for same meaning information (the users) and you have since gotten your login code to work with a 'type' field in your user table.

 

since you have posted old/out of date table definitions, you need to rework those before you can write any code to use that data.

 

 

 

 

anyway, to answer your question -

 

when a logged in lecturer navigates to the attendance page, you would use their user id to retrieve their list of subjects/classes. when they click on one of them, you would use the class id to retrieve the list of students in that class.

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 r1nk

r1nk

    Member

  • Members
  • PipPip
  • 26 posts

Posted 20 September 2013 - 11:57 AM

Im now making a simple project called student attendance.. I've just managed the register/login part..

Right now, these are the tables that i created so far..

 

http://i272.photobuc...zpsf1765f1c.png

http://i272.photobuc...zpsa1a1310a.png

http://i272.photobuc...zps092b7ff1.png

http://i272.photobuc...zps1fffbc49.png

 

What i need right now is some advice on how :-

 

The lecturer can select the course_id that have been assigned and then list of subject he/she teach will appear.. Based on what subject he/she clicked, an attendance table appear with list of students in that class and week 1- week XX (checkbox for attendance)..

 

Do i need to assign some primary and foreign key in my tables or adding some more necessary tables?

 



#2 r1nk

r1nk

    Member

  • Members
  • PipPip
  • 26 posts

Posted 21 September 2013 - 02:42 AM

hmmm.. bump.



#3 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,259 posts

Posted 22 September 2013 - 09:17 AM   Best Answer

you are still showing a separate table for each different type of user and you have usernames stored in related tables, rather than using the user's id.

 

you were told two or three threads ago not to have separate tables for same meaning information (the users) and you have since gotten your login code to work with a 'type' field in your user table.

 

since you have posted old/out of date table definitions, you need to rework those before you can write any code to use that data.

 

 

 

 

anyway, to answer your question -

 

when a logged in lecturer navigates to the attendance page, you would use their user id to retrieve their list of subjects/classes. when they click on one of them, you would use the class id to retrieve the list of students in that class.


multi-purpose programming fool and resident naysayer [We try not be negative in replies, but telling someone what they're doing wrong, while staying politically correct, isn't always going to happen.]

#4 r1nk

r1nk

    Member

  • Members
  • PipPip
  • 26 posts

Posted 22 September 2013 - 11:19 AM

Thanx for replying.. Yeah, i already updated my user table to one and this new thread is my new problem..

 

http://forums.phpfre...pective-tables/






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com