Hi,
for some weeks now, i have been trying to develop an attendance system with php and mysql.

I HAVE LOOKED EVERYWHERE!!
what i have done is this:

user select date (calendar).
date is processed in php page. if attendance has not been filled,then new attendance
sheet is provided.
else, redirected to choose another field.

The user is using checkbox to select which student is present( value true )

in the db: the date is stored like this:

columns: stud_id dat(date) Present

rows: 1 , 18/08/2011 , TRUE

there is no false, because of checkbox..

See, it is hard for me to create a view.

i need a report shown like normal attendance sheet in classrooms:

columns stud id lname fname date

rows x , x , x , present
y , y , y , absent

because the table in database and the html table have different format, i am struggling
to output it in a proper way.!!

PLEASE HELP!!

thanks.

I don't understand. You need to create a view between two databaes tables or you just need to display different data from the same database table? Can you provide more information?

Actually, i need to create a view from 2 different db tables.

So- one for the student details.
the second is the attendance table: it contains the id and date ( composite primary key ) and it contains another column presence ( value is true ).

I cannot put value false because a checkbox value only goes in db when it is checked!

so, the view must be printed in a web page like this:

stud id, stud name, date 1, date 2, date 3........

values of date can be either present or absent.

It is just like what they do in schools_ attendance sheet for school children:

date 1 date 2
stud x present absent ... and so on!!!

The GOAL IS TO GENERATE REPORTS TO SEE THE FLOW OF ATTENDANCE OF EACH STUDENT.

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.