Solved

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

Posted on 2010-09-20
11
5,499 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
 
LVL 108

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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 108

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 108

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 108

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now