ok, so i got the thing working. (yay!!🙂) The produced html gets
the necessary employee id. however, once submitted, it only gets
the last values of the query. Let's say i want to edit the
attendance for the months of may and june 2005. I tick the
checkboxes of the employees that i want to edit and input the
info that i want. When i press the submit button, the values that i
get are ONLY those of the last value in the array.
Let's say that the values that i want for May 2005 and June 2005
for employee 070809-0003 are:
Employee ID Month ID Current Year 1 2 3 4 5
070809-0003 06 2005 10 10 10 a a
070809-0003 05 2005 20 20 20 a a
The value that i get in the array will only be that of May 2005.
Yes, it does update individually, but how do you make it work so
that multiple records can be updated? Is it an SQL thing? If so, is
there a way around it? I think i also figured out the problem.
This is the HTML for the first one (copy to a text file and save as html):
<b>you are logged in as 'administrator'.</b><br><br><HEAD><TITLE> Attendance
Report </TITLE></HEAD><BODY> <H1 align=center> Attendance
Report </H1><H2 align=center><b> June 2005
</b></H2><b>Date Today: 2005-06-28</b><br><br>FROM: 05,
2005<br>TO: 06, 2005<br><p>Number of entries found: 2</p>
<TABLE border=1 align=center valign=middle width=190%><tr
align=center valign=middle><td align=center
valign=top><colgroup span=16 align=center><thead
class=titles><td><b>Check<td><b>Employee ID<td><b>Last
Name<td><b>First Name<td><b>Middle Name<td><b>Month
ID<td><b>Current
Year<td><b>1<td><b>2<td><b>3<td><b>4<td><b>5<td><b>6
<td><b>7<td><b>8<td><b>9<td><b>10<td><b>11<td><b>12
<td><b>13<td><b>14<td><b>15<td><b>16<td><b>17<td><b
18<td><b>19<td><b>20<td><b>21<td><b>22<td><b>23<td
<b>24<td><b>25<td><b>26<td><b>27<td><b>28<td><b>29
<td><b>30<td><b>31<td><b>Total Late<td><b>Total
Absent</b></thead></colgroup><FORM action=attendance2.php
name=chkbx method=GET><tbody class=data><td><input
type=checkbox name=chkemp[070809-0003] value='070809-
0003' onclick=document.chkbx.chk.disabled=false><td><input
type=text name=id2 value='070809-0003' size=10 maxlength=11
readonly><td>Santos<td nowrap=nowrap>Test2<td
nowrap=nowrap>Attendance3<td nowrap=nowrap><input
type=text name=mid2 value='06' size=2 maxlength=2
readonly><td><input type=text name=cyear2 value='2005'
size=3 maxlength=4 readonly><td><input type=text name=one2
value='30' size=4 maxlength=4><td><input type=text
name=two2 value='a' size=4 maxlength=4><td><input
type=text name=three2 value='a' size=4
maxlength=4><td><input type=text name=four2 value='a'
size=4 maxlength=4><td><input type=text name=five2 value='0'
size=4 maxlength=4><td><FORM action=attendance2.php
name=chkbx method=GET><tbody class=data><td><input
type=checkbox name=chkemp[070809-0003] value='070809-
0003' onclick=document.chkbx.chk.disabled=false><td><input
type=text name=id2 value='070809-0003' size=10 maxlength=11
readonly><td>Santos<td nowrap=nowrap>Test2<td
nowrap=nowrap>Attendance3<td nowrap=nowrap><input
type=text name=mid2 value='05' size=2 maxlength=2
readonly><td><input type=text name=cyear2 value='2005'
size=3 maxlength=4 readonly><td><input type=text name=one2
value='10' size=4 maxlength=4><td><input type=text
name=two2 value='10' size=4 maxlength=4><td><input
type=text name=three2 value='a' size=4
maxlength=4><td><input type=text name=four2 value='a'
size=4 maxlength=4><td><input type=text name=five2 value='a'
size=4 maxlength=4><td></td></tr></TABLE><br><input
type=hidden name=empid value=070809-0003><input
type=submit name=chk value='Submit'></FORM><FORM
action=ctr_attendance.html><input type=submit value='Search
Again'></FORM><br><FORM action=ctr_customized.html><input
type=submit value='Return to Customized Reports
Menu'></FORM><FORM action=ctr_reports.html><input
type=submit value='Return to Reports Menu'></FORM><FORM
action='ctr_main.html'><input type=submit value='Return to Main
Menu'></FORM></BODY>
This is the HTML for the 2nd Page (copy to a text file and save as html):
<b>you are logged in
as 'administrator'.</b><br><br><HEAD><TITLE> Attendance
Report </TITLE></HEAD><BODY> <H1 align=center> Attendance
Report </H1><H2 align=center><b> June 2005
</b></H2><b>Date Today: 2005-06-28</b><br><br>Array
(
[chkemp] => Array
(
[070809-0003] => 070809-0003
)
[id2] => 070809-0003
[mid2] => 05
[cyear2] => 2005
[one2] => 20
[two2] => 20
[three2] => 20
[four2] => a
[five2] => a
[empid] => 070809-0003
[chk] => Submit
)
<li>070809-0003<br>update attendance set d1='20', d2='20',
d3='20', d4='a', d5='a', d6='', d7='', d8='', d9='', d10='', d11='',
d12='', d13='', d14='', d15='', d16='', d17='', d18='', d19='',
d20='', d21='', d22='', d23='', d24='', d25='', d26='', d27='',
d28='', d29='', d30='', d31='', tlate='', tabsent='' where
eid='070809-0003' and mid='05' and cyear='2005'<BR><FORM
action=ctr_attendance.html><input type=submit value='Search
Again'></FORM><br><FORM action=log_attendance.php><input
type=submit value='Transfer to Excel'></FORM><FORM
action=ctr_customized.html><input type=submit value='Return to
Customized Reports Menu'></FORM><FORM
action=ctr_reports.html><input type=submit value='Return to
Reports Menu'></FORM><FORM action='ctr_main.html'><input
type=submit value='Return to Main Menu'></FORM></BODY>