Thursday, July 14, 2016

XAMPP Software Tutorial for PHP and MySQL

XAMPP is a free and easy to install software used to run PHP and MySQL applications. It includes apache to run PHP files, MySQL for easy management of databases and PHP. XAMPP is similar with WAMP Server that runs on Windows, MAMP for Mac and LAMP for Linux operating system.

Step # 1

Before we start, download and install first the latest version of XAMPP from and install it in your Windows PC.

Step # 2

Run the XAMPP Control Panel or search it in your computer. The control panel looks like on the picture below. Start the apache and if you are going to use MySQL for your database, start the MySQL also.

Step #3

Create your PHP script using any text editor. In my case, I do use notepad++ which can be downloaded on their official site. 

If you're a newbie in XAMPP, like I was before, the big question is in what directory are you going to save your php files. Funny but I wasn't able to run my php script when I was on my first time eventhough I know how to create php programs. Unlike LAMP and WAMP, you usually saved your php files in the following directory:


But in XAMPP, you put all your php files in the 


directory with .php file extention. 

Sample PHP Script


    echo "Hello World!";


Step #4

Just copy the script above and save it for example sample.php. To be able to run your PHP scripts, open any browser and type http://localhost/sample.php on the address bar and press enter.

And you're done!!! Hope this works for you! ^_^

XAMPP Software Tutorial for PHP and MySQL