![]() $v3 = $q7+1 //total attendance taken by teacher $v2 = $q7+1 //total attendance of student I used $q7 here for storing array results here. now run a query to fetch the old attendance of student and store it in variable. store roll number in variable while running the while loop $q3 = mysql_query("Select * from `class` ORDER BY `rollno` ASC") // get all roll numbers Here is the code for it, which I used successfully, you may further do the changes as you wish, after understanding the logic… Now, since we have displayed the form, let’s submit the attendance back to the database… So, here starting with the HTML & PHP Display code (the one which will be displayed) first: ![]() ![]() You need to set all students present as 1 and absent as 0 and add to your previous attendance database… ok… !.I suppose you are getting the list of students from database, right ?.Still slowly learning php code above may not even work but im pretty sure something like that would work. And not wanting to do the above 30 plus time any way to make it check all checkboxs at once. If the checkbox is checked I want to insert 1 else 0.īut i have like 30 checkboxs i am dealing with and might add more later on. I have multiple checkboxs that i need to insert in to db.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |