Weekly timesheet generator

I’m new to PHP and would like to get some suggestions and help.
I would like write a script to generate weekly timesheet.
An example of how the timesheet looks like is as below.
This is the initial design.
I do have the idea on how to create it but since I’m a beginner, I do not know where to begin. So, all the kind people out there, please advice! :D

This is what I have in mind.

  1. I’ll create a db to store the info of the timesheet, for e.g (name, date, fromTime, toTime) --> There might be other information that I want to include later.
  2. Then, I’ll have a PHP script that will prompt the user for input (the drop down menus) and then when submitted, a table will be displayed like the image above.

The problem I’m having now is that I do not know how to display the timesheet. Please advice… Thanks in advance.

Well the “Display” of the time sheet can be done a multitude of ways, however, I suspect that this will be very complex if you insist on having a nice “Graphical” view as you have in your example.

I would first start of with putting your data in a Table (html) first and then worry about making it pretty later.

Other than the graphics, what you asked is very little php and mostly html formatting. I would suggest you work on that first (getting it how you want it to display) with static data and then slowly add the Dynamic data (from the database). Tweaking and debugging as you go along.

PHP can handle the graphics, but you now have to make use of the GD library (or other graphics library) to manipulate things inside of php for presentation in the page. Pretty ambitious for a beginner though. Good luck.

Hope this helps you get started. When you get a block of code… come on back and we will look at that too.

[b]P.S. Could you shrink the graphic down so it will fit, without scrolling, on a screen of a resolution of at least 1024x768 or preferably 800x600. It’s bad enough that we scroll up and down to read a message/post, but I hate to scroll left and right too!

Thanks.
[/b]

I’d strongly suggest NOT to use the GD library and trying it out with HTML tables and HTML formatting first! I don’t consider myself a PHP beginner, but even I haven’t started GD yet (not because it’s hard, but because I haven’t needed it yet and because I’m kinda scared of it’s (possible) complexity :P).

Like Peg110 said: it’s best to use pure HTML at first, including (dummy) data to fill it up, and slowly start fetching real data from the database (after making a proper and scalable design for your tables of course).

I’ll shrink the graphics the next time I post again. Sorry for the inconvenience caused.

I thought of using HTML tables before this, but it won’t look nice. That’s why I’m trying out with PHP. But I’m not good at PHP yet, and I think to learn GD will be a real tough thing for me. But anyway, I’ll try it out. Thanks very much for all the advices and suggestions. :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service