# PHP/Mysql Based 'Whats in the Till?' Program
# Version 1.0
# README File
# By Mike Calabrese
# http://www.mikecalabrese.com
# 08-26-2003

# This program is available for free on an AS-IS basis.  I am not
# responsible for consequential damages, loss of income or whatever
# else that may happen as a result  of the use of this program.

This program is a checkbook register on a web page using the PHP scripting 
language and a Mysql database.  It can be used for organizations to show 
what their dues amount or 'Whats in the Till?' is.

PLEASE NOTE- You must have PHP4.0.6 or newer AND MySQL 3.23 or newer 
installed and running on your web server in order for these files to work. 

As far as particular questions about Mysql or PHP are concerned I would 
recommend 2 good books on these subjects:  MySQL by Paul DuBois and 
PHP and MySQL Web Development by Luke Welling and Laura Thomson 

The way the application works is that one can either check the balance, add   
to or subtract from 'Whats in the Till?' via a web interface and via PHP 
and MySQL.

The following configuration changes need to be made in order to successfully 
run this program:

1) Within your Mysql database create a table called the_till with the 
following attributes:
 
+----------------------+---------------+------+-----+---------+-------+
| Field                | Type          | Null | Key | Default | Extra |
+----------------------+---------------+------+-----+---------+-------+
| transaction_date     | timestamp(14) | YES  |     | NULL    |       |
| transaction_type     | char(1)       |      |     |         |       |
| transaction_amount   | decimal(6,2)  |      |     | 0.00    |       |
| transaction_balance  | decimal(6,2)  |      |     | 0.00    |       |
| transaction_initials | char(3)       |      |     |         |       |
| transaction_ip       | varchar(25)   |      |     |         |       |
| transaction_comments | varchar(255)  | YES  |     | NULL    |       |
+----------------------+---------------+------+-----+---------+-------+

You will initially have to fill in the initial values for transaction_date, 
transaction_type, transaction_amount, transaction_balance, 
transaction_initials, transaction_ip, and transaction_comments.  This way, 
you can test the HTML/PHP form balance immediately.

2) Where your HTML documents reside, create a directory called till. 
Chmod this directory to 755.  On some servers, you may have 
to chown this directory to to the proper group name.  Next, place the files  
till1.php and till2.php within this directory.  Note that on some servers you 
may need to rename this file phtml, php3 or php4.  Chmod this file to 755.  
On some servers you may need to chown this file to the proper group name.  

3) Now that you have your database set up and your files uploaded, it's time 
to configure the till2.php file.  

Line 8, replace "yourlogin" with the login to your Mysql database.
Line 9, replace "yourpassword" with the password to your Mysql database.
Line 10, replace "yourdatabase" with the database name on  your Mysql database.

That's it.  If your database is set up properly and your .php files are   
configured properly, you should see the initial balance 'In the Till' and 
be able to add and subtract from it.

This demo is configured such that you only get to make 1 deposit or 1 
withdrawl.  You can check the balance as often as you like.  The code that 
you will receive will not have this feature.