Author Topic: PHP Tutorial with XAMPP for Windows  (Read 187 times)

0 Members and 1 Guest are viewing this topic.

Offline MrSpecialist

  • Sr. Member
  • *
  • Posts: 348
  • Karma: +1/-0
  • I'm an expert!
    • View Profile
PHP Tutorial with XAMPP for Windows
« on: February 06, 2010, 06:04:30 PM »
PHP Tutorial with XAMPP for Windows


PHP is a powerful tool for making dynamic and interactive Web pages.
It is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP and other scripting languages.
In our tutorial you will learn about PHP, and how to execute scripts on your server.

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.

What is PHP?
PHP stands for PHP: Hypertext Preprocessor
PHP is a server-side scripting language, like Ruby on Rails, ASP, JSP and others
PHP scripts are executed on the server
PHP is an open source software
PHP supports many databases (MySQL, Oracle, PostgreSQL and etc.)
PHP is free to download and use
PHP files have a file extension of ".php" or ".php3"

Why PHP?
PHP runs on different platforms (Windows, Linux, Unix, etc.)
PHP is compatible with almost all servers used today (Apache, IIS, etc.)
PHP is FREE to download at
PHP is easy to learn and runs efficiently on the server side
What do you Need?
Any Text Editor like Notepad, Notepad++ and E
Download XAMPP for Windows at then install it just follow the installation wizard.
Note: The default installation directory is C:\xampp and C:\xampp\htdocs is the location for the PHP file.

How to Run a PHP file using XAMPP?
Create a PHP file then save it to C:\xampp\htdocs directory.
Open your browser then type "http://localhost/Your PHP File name" or "http://I.P. Address/Your PHP File name"

Basic PHP Syntax

A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.

//Put your code here

A PHP file normally contains HTML tags, Javascript and PHP scripting code.


echo " Hello World ";


Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another.

Note: The file must have a .php or .php3 extension else the PHP code will not be executed.

Comments in PHP
Code: [Select]
// to make a single-line comment
/* and */ to make a large comment block.


//This is a comment

This is
a comment



Variable Declarations in PHP

Variables are used for storing a values, like text strings, numbers or arrays.
In PHP, a variable does not need to be declared before adding a value to it and no data type needed, PHP will automatically converts the variable to the correct data type, depending on its value.

PHP variables are start with a $ sign symbol.

Code: [Select]
$variable_name = value;

Naming Rules for PHP Variables
A variable name must start with a letter or an underscore "_"
A variable name should not contain spaces.
A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )
Valid Example:
« Last Edit: August 16, 2016, 06:25:28 AM by MrSpecialist »

Techronnati | where technology never sleeps

PHP Tutorial with XAMPP for Windows
« on: February 06, 2010, 06:04:30 PM »

Mountain View

Offline GBTalk

  • Full Member
  • *
  • Posts: 187
  • Karma: +0/-0
    • View Profile
Re: PHP Tutorial with XAMPP for Windows
« Reply #1 on: November 18, 2016, 10:44:45 AM »
sa mga gusto mag aral ng PHP at XAMPP. actually may bagong kacompetitor ang XAMPP. it's the so called BITNAMI. ok din sya naka packages ang mga software bundles nila at mukhang promising kasi habang tumatagal dumadami ang pwedeng software applications na pwedeng iintegrate.


Related Topics

  Subject / Started by Replies Last post
2 Replies
Last post September 08, 2008, 05:40:53 AM
by Corps
0 Replies
Last post August 31, 2008, 11:11:47 PM
by JusticeLeague
0 Replies
Last post October 18, 2008, 06:53:38 AM
by rpmolecule
0 Replies
Last post August 12, 2014, 09:45:31 AM
by rpmolecule
0 Replies
Last post October 28, 2015, 01:08:38 AM
by CyborgRepublic

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.