Installing PHP on Windows
Installing PHP is easy. You can install PHP on your computer easily with WAMP5. WAMP5 is an open source application which comes with with PHP5, Apache web server, MySQL database and phpMyAdmin (mysql database administration program). You can install these items on your windows machine using WAMP5. You can read more about WAMP5 at  www.wampserver.com.
  1. Download the latest version of WAMP5.
  2. Run the installation wizard and follow the easy instructions to install WAMP5.
  3. Once you're done installing WAMP5, please go to your folder where you installed wamp5. If you didn’t specify which folder to install wamp during the installation wizard, then it should be installed in your C:/ drive, i.e. C:/wamp.
  4. In your wamp directory you should see the following folders.
    1. apache2 – This is where the apache web server is installed. Apache will run our php code and scripts on the web browser. You will not need to do anything in this folder. So you can relax and ignore it for now:)
    2. mysql – This is where MySql databse is installed. MySQL is an open source database. PHP and MySQL work really well together. You can use PHP and MySql to store data. Don’t worry, we will learn how to do all that in our tutorials.
    3. php – You guessed it. This is where php modules are stored.
    4. www – This is the root folder of our web server. This is where you are going to put all your php files and scripts.
    5. wampserver.exe – This file will run the WAMP program. We need to start WAMP everytime we want to work with PHP. So, go ahead and double click on this file.
  5. Once you run the wamp server file, you will see a small icon on your windows tray.
    wamp tray icon

    Right click on this icon and then click on “Start All Services”. This will start the apache web server along with everything we need to run PHP pages on our machine.
    wamp start

    That it! You’re almost done.
  6. Now open up your web browser and type in http://localhost. You should see the WAMP welcome page.
    When you type in http://localhost in your browser, it executes the index.php file in your www folder. All our php files will go in the www folder. Follow the next tutorials to see how that is done.