Learn PHP the Practical Way
Web Design Academy offers a practical course on PHP and MySQL. PHP is a powerful language that allows you to build dynamic websites and applications not possible with just HTML & CSS. It is one of our newest courses and definitely a great skill to have. In this article we discuss what PHP is and why you should learn it.
Learning a new language (programming or otherwise) can be a bit overwhelming. Many people just don’t know where to start and give up before they even begin. Learning PHP is NOT as overwhelming as it might seem, I promise you. Just take it one step at a time, and before you know it you’ll be off and running.
This post is part of the Why Study Series:
- Why Study Web Design
- Why Study WordPress
- Why Study HTML5
- Why Study CSS3
- Why Study Mobile Website Design
- Why Study jQuery
- Why Study PHP
What You Should Already Know
Before you continue you should have a basic understanding of the following:
If you want to study these subjects first, find the practical training we offer on our Website
What is PHP
PHP is a scripting language that is often embedded into HTML to add functions HTML alone can’t do. PHP allows you to collect, process and utilize data to create a desired output. In short, it let’s you interact with your pages.
PHP is able to preform a number of tasks including printing data, making numeric calculations (such as addition or multiplication), making comparisons (which is bigger, are they equal, etc) and making simple boolean choices. From this you can create more complex loops and functions to make your page generate more specialized data.
What is MySQL
MySQL is a relational database system that is used to store information. MySQL can store many types of data from something as tiny as a single character to as large as complete files or graphics. Although it can be accessed by most programing languages, it is often coupled with PHP because they work together with ease.
Information stored in a MySQL database hosted on a web server can be accessed from anywhere in the world with a computer. This makes it a good way to store information that needs the ability to change over time, but also needs to be accessed over the net. Some examples that can utilize MySQL are a web message board or a customer’s shipping status.
How do PHP and MySQL work together?
PHP and MySQL complement each other to do with neither can do alone. PHP can collect data, and MySQL can in turn store the information. PHP can create dynamic calculations, and MySQL can provide it with the variables it uses. PHP can create a shopping cart for your web store, but MySQL can then keep the data in a format PHP can use to create receipts on demand, show current order status, or even suggest other related products.
Although PHP and MySQL can each be used independently, when you put them together it opens up countless possibilities for your site. As the internet progresses, it becomes more and more necessary to deliver dynamic content to keep up with the demands of web surfers and their desire to have information instantly delivered to them online. By learning to use PHP and MySQL you can deliver this information to them on demand.
Why Study PHP
PHP is an amazing and popular language!
It is powerful enough to be at the core of the biggest blogging system on the web (WordPress)! It is deep enough to run the largest social network (Facebook)! It is also easy enough to be a beginner’s first server side language!
- Runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
- Is compatible with almost all servers used today (Apache, IIS, etc.)
- Supports a wide range of databases
- Is free. Download it from the official PHP resource: www.php.net
- Is easy to learn and runs efficiently on the server side
What Do I Need
To start using PHP, you can:
- Find a web host with PHP and MySQL support
- Install a web server on your own PC, and then install PHP and MySQL
When creating PHP pages, you can use the same program you use to create your HTML pages. Any plain text editor will do. You will also need an FTP client to transfer files from your computer to your web hosting. If you already have an HTML website you most likely already use an FTP program.
Use a Web Host With PHP Support
If your server has activated support for PHP you do not need to do anything. Just create some .php files, place them in your web directory, and the server will automatically parse them for you.
You do not need to compile anything or install any extra tools. Because PHP is free, most web hosts offer PHP support.
Set Up PHP on Your Own PC
However, if your server does not support PHP, you must:
- install a web server
- install PHP
- install a database, such as MySQL
We cover how to install PHP, MySQL and Apache (Web Server) in our WordPress and PHP courses.
What is a PHP File?
- PHP code are executed on the server, and the result is returned to the browser as plain HTML
- PHP files have extension “.php”
What Can PHP Do?
PHP can generate dynamic page content. Can also create, open, read, write, delete, and close files on the server. With PHP you can collect form data. You can send and receive cookies, add, delete and modify data in your database. PHP can restrict users to access some pages on your website, as well as encrypt data.
With PHP you are not limited to output HTML. You can output images, PDF files, and even Flash movies. You can also output any text, such as XHTML and XML.
PHP MYSQL Course
Web Design Academy Offers a Practical PHP MYSQL course in Durban and Gauteng.