Home arrow PHP arrow Page 9 - Time is Money (part 1)

Time For Bed - PHP

For consultancies that bill on an hourly basis - lawyers,accountants et al - time tracking is a critical part of the billingprocess. For small- and medium-size organizations, resource tracking,allocation and analysis is essential for business efficiency and planning.This article addresses both requirements by teaching you how to build atimesheet system to track and analyze work hours with PHP and MySQL.

TABLE OF CONTENTS:
  1. Time is Money (part 1)
  2. Up A Creek
  3. Bills, Bills, Bills
  4. So Many Tables, So Little Time
  5. Open Sesame
  6. The Lazy Programmer Strikes Again
  7. Today's Menu
  8. Too Much Information
  9. Time For Bed
By: The Disenchanted Developer, (c) Melonfire
Rating: starstarstarstarstar / 5
October 22, 2001

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
Of the five options available on the main menu, I've just taken care of two - or, if you want to get technical about it, 40% of the project is now complete. I'll do one more, just to put me on the right side of the halfway mark, and then shut shop for the day.

Since I'm asleep on my feet, I think I'll skip the data entry and report generation code for the moment - this is bound to be complex, and I need all my wits about me to tackle them. Instead, I think I'll handle the last item on the menu next - the "logout.php" script.

<? // logout.php - destroy user session // destroy session data session_start(); session_destroy(); // redirect to index page header("Location:index.html"); ?>
I don't even think this qualifies to be called a script - it's just three lines of code. All it does is destroy the current session and redirect the browser back to the index page to await a new login.

And that's about it for the moment. We've accomplished a fair amount of work so far - we've got the requirements down, designed a database schema, put together scripts to handle user login and logout, and written all code necessary to display project and task information.

In the concluding part of this article, I will be discussing the scripts which handle timesheet display, record addition and deletion, and report generation. These scripts, especially the ones that handle report generation, will be substantially more complex than the ones you've just seen, so I need to give them some thought before sitting down to write the code. Why don't you do the same, and we'll get together soon to compare notes?

Note: All examples in this article have been tested on Linux/i586 with Apache 1.3.12, mySQL 3.23 and PHP 4.06. Examples are illustrative only, and are not meant for a production environment. YMMV!

 
 
>>> More PHP Articles          >>> More By The Disenchanted Developer, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: