USING PHP AND MYSQL TO CREATE A EXPENSE

- Slides: 1
USING PHP AND MYSQL TO CREATE A EXPENSE CATALOGUING PROGRAM Tony Mulenga, Brian La. Vallee, Richard Schaber Technologies Department, PBXL Background • PHP (Hypertext Pre-Processor) is a scripting language popularly used in the creation of web pages created by Rasmus Lerdorf. • My. SQL (My Structured Query Language) is a popular choice for the storage of data gathered from these web pages, such as e -mail information. It is owned by Sun Microsystems. PHP and MYSQL will be used to create a module in dotproject that achieves the following goals: 1. An easy way for employees to enter expense data 2. Generate a report, preferably a pdf file, that employees can turn in to the accounting department for analysis of their expenses. Having access to a expense cataloguing program is very important in business to business situations. A lot of money is spent by both parties, so keeping track of the cash flow becomes very important. Using PHP and MYSQL to create a module for the dotproject program provides an easy method for the entry and storage of data. • As part of my learning experience, I also made several test modules, one of which is pictured below: Before beginning any work to create a module, there are certain pre-requisites: • Experience in using PHP and MYSQL: Sample code of an sql query within PHP code: • Using the product of these two programs, alongside a backend management program called dotproject, a user friendly expense report generator can be made. Importance • Although the dotproject is useful, it is not properly documented; I had to go through the existing code to learn how implement the modules. This led to many opportunities to review PHP and My. SQL queries while reviewing the files in the modules that were already installed. Introduction Mysql screenshot • A combination of these two programs allows for the creation of a expense cataloguing system capable of producing expense reports. The PHP would create a file that takes in user input, while the database stores all inputted data. Testing Goals Results • Skills in coding through a unix/linux shell. This may seem unrelated, but dotproject files and extensions can only be accessed thoroughly through mastery of the shell. To the left is the screen initiation screen for Pu. TTY, the program I used to go through a unix/linux shell. • The module I made was able to give the employees a way of entering/viewing their expenses and generating a pdf version of their entries. • I also made some discoveries on how to use certain parts of dotproject, which I documented in the company Wiki. Final version with imaginary data: This material is based upon work supported by the National Science Foundation under Grant No. OISE‐ 0530220. Internship conducted at PBXL, Inc. in Tokyo, Japan as a participant in the Nano. Japan 2009 Internship Program. http: //nanojapan. rice. edu