PHP is the programming language of the web it’s a fact the php is used on more webservers servers than any other web language. At the time of writing php is installed on just under than 24,000,000 Domains. For a more detailed introduction to php try the link.
MYSQL is a commercial grade database application that is made available free under the Open Source to anyone. It’s had over 6 million installs ranging from large muli-national corporations to specialized embedded applications the website also claims mysql is installed on every continent in the world… Including antartica. At least they can blame the weather when the computer freezes… hehe! Currently MYSQL runs on more than 20 platforms including Linux, Windows, OS/X, HP-UX, AIX and Netware. Which is a perfect solution for portability requirements.
PHP - MYSQL it does have uses
The benefits to creating a site that implements a php and mysql setup are really down the site and how it wants to run and taking into account how specific data is stored and displayed, php and mysql can be used in many senarios including:
# Storing and Displaying Lots of Categorised data
- For example the article you are reading now, has come from our mysql database. Sites with lots of information that needs to be categorised, stored and easily displayed would benefit from a mysql backend. Lets again take this site for example, if we created the site the old fashioned way then we would have to create a single HTML page for every article. Now lets say we we wanted to change a link in the menu right of this page then we would need to go through each and every single HTML page and manually change every element to it. Not fun I’m sure you’d agree. but with php and mysql all we now need to do is change one single php page and the whole site updates our link.. Saving you time and your sanity.
# Saving customer data into php-
Many websites as an example use the duo to save customer data, Including Name, telephone, address etc.. well you get the picture. MYSQL can also track customers locations on the site and save that information into the database. PHP can also store customer purchasing and previous orders into the database which allows you to build up a perfect system for tracking customer trends and customers shopping habits based on country. All you would need to do is create a php that told mysql to grab the particular information only.
# Forums use mysql
- Messaging boards or forums as they are sometimes known as can use php and mysql to create some pretty great communities allowing us to communicate with people with the same interests just a quick note if your looking for a really good Webmaster Forum please check out webmaster-talk. If a forum is what you were looking for then here is a quick list of the most popular and recommended.
1. PHPBB - PHP bulletin board is a great choice and very popular.
2. vBulletin - Instant Community Another good forum choice been around a long time and WHT uses them!
Please take note that your web host will have php and mysql pre installed on the server but and easy way to check is copy the code just below into notepad then save it as ‘info.php’. Upload it to your webspace via FTP and then goto your browser and type in www.yourdomain.com/info.php
or where ever you dropped the file.
it should show you a lot of information such as the version of php your running and additonal, but useful information about the configuration of your php. A list of installed manuals is also included.
To install PHP & MYSQL on windows you can do it manually or you can use a program called WAMPserver which will automatically install the setup for you, just to let you know the W.A.M.P stands for windows, Apache, Mysql and PHP.
WAMPserver installation on windows
WAMP5 installs the following software on your machine Apache 1.3.31 ,PHP5, MySQL database ,PHPmyadmin and SQLitemanager on your computer. Essentially your going to turn your windows machine into a webserver beacause we are installing apache. PHP does need apache webserver to run in this setup usually.
You can download WAMPserver here
Here are the installation instructions from wamservers site:
When you install WAMP5, all the files are copied in the directory you choose. Conf files are then modified to point to that directory. It also installs a “www” directory which will be your Document Root.
At the end of the installation, WAMP5 will automatically install Apache and MySQL as services :
- service’ wampapache’ : apache service
- service ‘wampmysql’ : mysql service
WAMP5’s installation is compact. This means that all files are copied to WAMP5’s directory. Only the MySQL conf file (usually my.ini) is copied to the Windows directory but as “mywamp.ini” to avoid conflicts with other installs. You just have to click on the icon tray to access WAMP5’s menu, The icon tray reflects the status of your server, When you’ll uninstall WAMP5, all the services and files will be automatically deleted.
In part two will be getting down to the nitty gritty by setting up the mysql database and connecting to it through php.
The next installment of this tutorial can be found below:
PHP/MYSQL Tutorial Part 2: Setting up MYSQL Database