23
2011
How to start PHP Programming ?
I welcome you back after short break from. . Today i am going to describe you how to write and execute your php program. and how to start Programming in PHP. I will try my best to guide you through this tutorial.
Shall We start it now??
Well, all you need is a Notepad editor which comes with your Windows and a PHP Apache Server. There are many PHP servers. I prefer you to use Wamp Server. For your 32-bit windows download it Here and if you have 64-bit windows then download it Here.
Double click the installer you just downloaded. On a simple Next-> Next-> Click you will finish the installation of Wamp Server. On your desktop you will find Shortcut named Start WampServer, Open that. To check whether your wamp server is properly installed or not, check on your internet browser by typing http://127.0.0.1 or http://localhost . If you find an error message, your wamp is not installed or started properly. For proper starting At the right side of task bar ( Near the position where clock and date is displayed), click on wamp server and select “Start All Services”. Now we are ready to write and taste our first php page.
1) Write the following code in your notepad.
<html> <head><title>My first Php Page </title></head> <body> <?php echo "This is my first PHP Page"; ?> </body> </html>
2) Save the file into the following directory : C:\wamp\www named test.php or your desire name. Make sure you have installed wamp on C: drive. In case of other drive, replace C by d,e, or your proper drive.
3) Start your internet explorer, and type the following address
http://localhost/test.php
4) If you haven’t made any error on code, you will see the page saying “This is my First PHP Page” to you.
As you see, we can insert php script anywhere inside html just with the <?php ?> tag. All your php code reside within these two tags.
Try it out, for any problem and suggestion you get, please post in comment. I would be happy to help you.

An article by