Hi folks;
I am a wannabe programmer and decided to attempt a small project in php that I could use for an organization that I am affiliated with.
It is a repository for name, address, phone number, registration number, etc. About 20 fields in all. It will only be accessed by 3 or 4 users, and generally the information is fairly static so these users will for the most part only be searching the database and displaying some specific reports (probably in table form)..
I don’t have the availability of a database (like MySQL) on the server that is available for this, so I am using a flat file.
I have managed to create a form that writes data to the flat file and another that displays the file contents record by record in a table created in HTML by php.
So with that adventure behind me, simply to prove that I could navigate around a bit in php, I am now faced with coming up with a design that might function for me in this environment.
One of the requirements will of course be to add, delete and modify records.
I’m thinking that from a functionality perspective that I could read from the file into an array and then list the records by last name, first name, registration number. I have seen examples of this where each line would have a clickable icon for each of these functions (add, delete & modify) that the user selects. I think that I am OK with creating a form to add a new record, and deleting an existing one, however I am struggling with how to let the user edit any or all of the fields of an existing record. Should I be thinking about presenting the record with an “edit” button adjacent to each field that the user would click on to edit only that field or are there better solutions?
And to wrap up the project, I will need to permit the users to print out the contents for a variety of reports with some of the fields of each record displayed. Although it would probably be acceptable to print from the browser, from what I have read from my sifting through php items, I might be able to display the page in HTML and print to a pdf type document.
Since the number of users is limited to 3 or 4, and the number of records in the database will probably never exceed 100, and it is not extremely critical data, I am not too concerned about a lot of data verification at this point in time, however I would like to incorporate it into the project as I work my way through this.
If anyone can give me some general advice on how to attack this project I would be very thankful, and even more so if you could point me to some sample code or applications that might have similar functionality especially in editing records. Generally I seem to learn the most and have successful outcomes by attempting to understand and modify similar code.
So thanks a bunch in advance for your advice.
Albert