dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Displaying attendance on a web page

  1. #1
    Join Date
    Nov 2011
    Posts
    2

    Displaying attendance on a web page

    I wish to display attendance in a table where the dates are horizontally on top and Names verticalyy on left. Sof far is simple. But what i am not able to do is (for printing purposes) mark Sundays or Holidays so that the word is shown across the column. For display purposes, i am showing in different colour. We have only a b/w printer and greying it would wate a lot of ink

    How should i put this in html./php/javascript This would be for 30 or 31 days to be fit in one A4 page

    regds and thanks in advance
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2011
    Location
    Vero Beach, Florida
    Posts
    70
    This is not an especially elegant solution, but you could do it with PHP code to build an HTML table. First build the header row with the days. Then code a couple of loops, the outer loop for the rows in the table (one for each name), and the inner loop for the days, creating one <td> cell for each attendee containing "P" or "A" or whatever you desire.

    I won't give you all the code, but when the day is Sunday or a Holiday, you will need to create only one <td> at the first attendee row, like this:

    echo '<td rowspan="' . $cntnames . '">';
    echo 'S<br />U<br />N<br />D<br />A<br />Y</td>';

    This should display "SUNDAY" vertically, filling the whole column.

  3. #3
    Join Date
    Nov 2011
    Posts
    2

    Lightbulb Elegant solution

    Thanks for the reply.

    I could not think of a better way than this for presenting the attendance for the entire month.

    As you have pointed out that this is an inelegant solution then how can i make it more elegant


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles