Solved

How can i build a student attendance register with PHP/MySQL?

Posted on 2010-09-20
11
5,648 Views
Last Modified: 2013-12-12
Hi there,

I'm building a school intranet system. Everything has been a breeze so far but now i'm getting to building the student register.

I have the student contact table already but just need to build an attendance register,

It will be Monday to Friday and have AM and PM boxes.

Whats the best way to go about coding this as its wrecking my head.

If you need any more info please let me know :D

Thanks
0
Comment
Question by:projectstudios
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 7

Expert Comment

by:rangasuman
ID: 33720293
Hi,

There is a free open source PHP solution that might be useful to your requirement.
http://sourceforge.net/projects/freesms/

Goodluck.
0
 
LVL 12

Expert Comment

by:Rok-Kralj
ID: 33720534
If you will go to program it on your own...

Let's say you have a database table with students, each have an ID number.

You can then make an additional table to the database, named attendencies.

student_ID INT
class_start UNIX_TIMESTAMP
class_end UNIX_TIMESTAMP

0
 

Author Comment

by:projectstudios
ID: 33720638
Hi folks, thanks for replying. I've looked at the program you gave me @rangasuman but it seems to be very buggy and i cant even login after installing it.

@Rok-Kralj - The students table is setup, all with an ID number.

If i create a table like:


ID -student_id - date - time(if it's AM or PM) - Record

1 - 1 - 2010-09-20 - AM - B (B means present)

If i do that, it would mean all students would have 10  records a week. How could i then display those 10 rows in a table in one line. If i echo them they will all be displayed under one another?\

Thanks
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 109

Expert Comment

by:Ray Paseur
ID: 33720771
This would be a good place to hire a developer instead of trying to learn the entire design paradigm by asking "how" at EE.  But there are many examples available in the technical literature.  Is this by any chance a classroom assignment?  If so, we are prohibited by the TOS of EE from offering more than general guidance and learning resources.

Check the links here:
http://lmgtfy.com?q=PHP+MySQL+attendance+database
0
 

Author Comment

by:projectstudios
ID: 33720810
@Ray Paseur - Thanks for replying.. No this is not a classroom assignment. I'm basically building a local intranet site to keep our students information and attendance organised instead of being all in hundreds of word documents.

I have built pretty much everything else i need to build right now apart from this. I can't really afford to hire anyone to do this as im the one who is being paid to put together the system.

I just cannot find a way in my head which will be the best way to do this.

Any help or guidance will be much appreciated.

Thanks
0
 

Author Comment

by:projectstudios
ID: 33720825
Just to add also,

I have a way lined out in the DB but on the page it displays the results under one another and not in the same row of the html table.

Does anyone know how i can get it to display all the result from the query in one HTML table row?
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 33721020
OK, here are the tables I would probably use.

Students with names, Classes with DATETIME.

Each time a student attends a class, you would add a row to a pivot table that associates the Student with the Class.  Your queries can join these tables together to create the attendance roster.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 33721034
I'm not sure I can envision how an attendance record could be produced in a single row of HTML.  I think formatting the output is really a different question from designing the DB tables and queries.
0
 

Author Comment

by:projectstudios
ID: 33721056
Awesome, i shall give it a go tomorrow. I'm guessing instead of having classes in a table, i could just have Morning & Afternoon as periods?
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 33721269
Yes, you could have something that simple and it would be workable, or you could use DATETIME columns to identify the class times.
0
 
LVL 12

Expert Comment

by:Rok-Kralj
ID: 33722584
This application can be as complicated as you want it to be.

You can have a table of students, teachers, classrooms, classes (connects teacher and classrom at certain time), class_attendencies (connects students to classes), etc...
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question