tags:

views:

14

answers:

1

I am creating a small site for my college where the instructors will be able to enter the marks and attendance of the students. I stuck at add records option where the instructor will enter the marks of students all at once(using pagination) or one by one(he enters once,clicks next and enters another).The input fields are marks, total classes, attended classes. Here are my questions and thanks in advance:

  • how do i generate input boxes.say 40 students' marks can be entered in
    single page. then how do i give them (id)s and (name)s. later on how do i use the POST data to for each
    student?

  • how should i paginate( any recommended class or code idea?)

  • how do i implement the one by one option?

    thanks again.

A: 

1)

for ($i = 0; $i < 40; $i ++) {
    echo '<input name="mark[]" type="text" />';
}

2) look up jQuery http://jquery.com/ and jQuery Data Tables http://www.datatables.net/

Petah
thank for the quick reply.every marks input form is preceded by the usn(university serial number). later on how do i loop through the POST array to get the marks and attclasses and totclasses for each usn.