
PHP/MySQL
Programming for Websites and Databases
PHP is a widely used programming language for the web. It can be used to check and send user input from forms, run scripts, create web pages and communicate with databases. MySQL is a database format which is often included as part of a site hosting package but the included interface (phpMyAdmin) can be difficult to use. The two can be combined to create database systems with login and registration systems, custom screens with buttons and menus, one-click reports, etc, where MySQL is used to store the information and PHP to create the user interface and public sections of a website.
There are several open source (free) PHP/MySQL systems available, such as WordPress, Drupal and Joomla, which are used to create websites. They include a database interface and allow someone to add or edit web pages without needing to know how to write HTML or program in PHP. The database stores information such as user ids and passwords and the actual text or images for the web pages. The PHP code creates screens for text entry, image uploading, etc. These packages also have a wide range of user-contributed modules, such as website designs (themes) or code to do special things (create calendars, make forums, etc.) which can be combined with the basic package to customize a website, add features, or create a particular look and feel.
PHP is often used without a database, to create menus, validate forms, run slideshows, etc. This site uses PHP to generate the site navigation, based on what section of the website you are in. It does this without a database, using the current page location to select a folder on the server and generate links to the files within. Server variables are used to determine which links should be color coded to indicate the current site section and page, and which CSS styles should be applied to open the current section menu.
Other sites are almost entirely database-driven, using just a few templates to display information from a database in a consistent manner. Sites using WordPress or another blogging or content management system (CMS) work like this, as well as many custom e-commerce sites, such as anniversary-invite.com, which uses a single template file to generate all pages within the products catalog, and a few lines of code in an .htaccess file to re-write urls, creating unique web addresses for each item.