Create Your First PHP Web PageMy Comsats

Create Your First PHP Web Page

Before creating your first php page please download and install following software tools. You can easily google.

1: SublimeText or Dreamweaver

2: WampServer or XAMPP

3: FileZilla or Smart FTP

SublimeText or Dreamweaver

SublimeText or Dreamweaver will be used to write HTML,PHP ,JavaScript and CSS codes. SublimeText is free but for Dreamweaver you may to purchase it but it more flexible and easy to use.

WampServer or XAMPP

WampServer and XAMPP are used to create local server because we are going to make PHP website and remember php is sever side language we cannot get output with creating a local sever until we buy an online hosting sever.

FileZilla or Smart FTP

FileZilla or Smart FTP are used to transfer files from your PC to online server. We will use it at end of this series.

I am using SublimeText, XAMPP and FileZilla because I am very familier too them but you can make you own choice.I suppose you have installed all these tools if so lets move forward.


Run your XAMPP and make sure Apache and MySQL Services are running.



Click at Explorer in XAMPP Control Panel dialog as showing above.


Open “htdocs” folder and create a new folder with name “mywebsite”. We will save all our website files in this folder.


Open SublimeText or Dreamweaver and write following HTML code and save it as index.php in mywebsite folder.

<!DOCTYPE html>
<title>Vehicle Tracking</title>
<h1>Welcome to our Vehicle Tracking System</h1>

Step5 :

Open you browser and write http://localhost/mywebsite/index.php in your address bar.


Congratulation you have created your first web page let add one more thing. Create a new php file like above and name it as “map.php” and save it in same folder.

    <!DOCTYPE html>
    <title>Vehicle Tracking Map Page</title>
    <h1>This is map page we add map later.</h1>


Lets connect these two files with hyper link. Open index.php and write following line under welcome line

<h2><a href="map.php">View Map</a><h2>

We are adding all the things in <body></body>tags.


Again visit your index page and click and at View Map. Are you getting Map page?

These are basics to create a simple php pages but you are at right track if everything is working for you till now. In next tutorial you will learn how to add Google Map in map.php.

Let's Discuss

  • Iqra Ubaid

    Where is the next tutorial?