Forums
This topic is locked
MySQL PHP DMX multiple records editing
Posted 24 Aug 2003 07:23:34
1
has voted
24 Aug 2003 07:23:34 wing chiu yip posted:
I am a secondary school teacher. Recently I want to build a web application such thatI can retrive the student name list from my school server and input mark/grade to every student and then save the result to server again. Originally, I think it is easy to display all students on a single screen and then input the mark/grade to each student, and finally just press a single submit button to save result. After reading many books, articles, tips etc. I found that all such material just teach me how to edit a single record only. If I want to input mark/grade for all student. What I must to do is 1. display/edit a single record ->2. submit the result ->3. go to next record and then repeat step 1 to step 3 again until all marks/grade are input. There is also an alternate, it displays all student names on the screen and there is a update button to each student, when I press a button for a particular student, it jumps to a page to edit the mark for this student. After pressing the submit button, it jumps back to original screen. It is not I wanted.
What I want is as follows :
each line represents a single record in db.
No. Name mark
===============
1 Tom 40 <- input
2 Peter 37 <- input
3 Mary 68 <- input
submit reset <- button
Is there any method to edit multiple records?
Replies
Replied 23 Mar 2007 00:37:10
23 Mar 2007 00:37:10 Roger Goodwin replied:
I need to do a similar thing, did you ever find a solution?
Roger
Roger
Replied 24 Mar 2007 19:01:26
24 Mar 2007 19:01:26 Alan C replied:
I think there should be a way to do this based on generating textboxes, one for each student, each with a different id, name and value. You could do this within a loop in php, using something like the student id.
Then you can take the existing mark of each student, and display it as the initial value inside each textbox.
when you click submit, all the values would go back to the server as POST items, then you can pick each up inside a loop and update each record with the new value then redispaly the page so you can see that the updates happened how you expected.
Then you can take the existing mark of each student, and display it as the initial value inside each textbox.
when you click submit, all the values would go back to the server as POST items, then you can pick each up inside a loop and update each record with the new value then redispaly the page so you can see that the updates happened how you expected.