PHP: Hypertext Preprocessor (PHP) is a free, open source, scripting language that is made primarily for the creation of dynamic websites.
It is compatible with almost all modern servers and PHP scripts are always executed on the server. We would suggest a simple understanding of HTML which you can get a short taste of in this thread. If you want a more in depth look into CSS and other aspects of site creation, take a visit to the w3schools HTML tutorial.
What can it do?
PHP has a huge collection of uses such as:
- Database management
- Generating dynamic content on a page
- Handling data from forms
- Controlling and limiting site access to users
- Data encryption
So much more!
The list of uses for PHP goes on and on. Because of this, it is the backbone behind some very big websites including Facebook and it powers the world’s most popular CMS (content management system) WordPress.
To get started with learning PHP you first need to install or buy a web server to host the files on. In this tutorial we will be using XAMPP, this is a free tool which allows for an easy set up of a local web server.
Download and install XAMPP from here. Once you have XAMPP open up the control panel and click on start for Apache and MySQL, these are the only 2 modules we will be needing.
Now that’s all done we should probably check if your XAMPP is working. To do this we will make a very simple script just to check.
echo “Welcome to YEAHHUB”;
Create a new test.php file using the editor you installed and drop it into the XAMPP htdocs directory and call it “test.php“.
If you are using windows and used the default XAMPP install directory, your htdocs folder will probably be at C:\xampp\htdocs\ if you can’t find it.
Once you’ve done all this go to your browser and type in http://localhost/test.php and if you have followed all these steps you should be greeted with a page saying “Welcome to YEAHHUB“.
Continue to Next Chapter – Complete PHP Tutorial – Chapter 2