Customer Widgets Incversion 1
Please use this website as a learning tool to help you understand how to properly use PHP to create scalable, dynamic web pages. Having a workable website with the code to review is an excellent resource in learning a server-side programming language.
You will need a basic understanding of PHP to fully understand the concepts used in this site. This site uses some specific PHP 5 features (classes, exception handling, and the mysqli extension) which can be applied to any exisiting or new PHP website.
This website uses a MySQL database with one table called customers. The customers table has 7 fields: id, fname, lname, address, city, state, and zip.
There are three main sections to this site: Viewing customers, Adding customers and Search. The View page lists all customers 10 records per page with edit and delete button links. The Add page adds a new customer as well as pdates an exisiting customer. The Add page also incorporates simple validation to make sure all fields are entered. The Search page performs a keyword search within all columns and highlights the keyword in each record.
Though this is just 'one way' to code this type of functionality (adding, editing, and searching data) in PHP, you should at least get a good understanding of how it can be done efficently and with expandability in mind.
Download the complete code and email me at frank@javascriptworkshop.com with any questions.