Oh shukla ji
What is Your Table Structure where you save attendence data
it should be like this..
Table: tblatt
userid int
dayid int
when user1 login and add attendence then
add row with
userid dayid
1 1
2 1
3 1
1 2
2 2
now in above table and data
if user1 login on 2nd day then check that ..
select count(*) ct from tblatt where userid=1 and dayid=2
then result is
ct
1
datatable returns 1 row then you should disable button and if
user3 login then result of above query
select count(*) ct from tblatt where userid=3 and dayid=2
is
ct
i.e. blank. no row given by database
then enable button