Chapter01 Intro To PHP PDF
Chapter01 Intro To PHP PDF
introduction
Web page
HTTP
request Records
Database
Web Application Dev using PHP & MySQL - All rights reserved (2016) KERUL.net Chapter 1:1
Chapter 1: PHP Intro
o Google Chrome.
o Opera.
Web Application Dev using PHP & MySQL - All rights reserved (2016) KERUL.net Chapter 1:2
Chapter 1: PHP Intro
Exercise 1
1. What are the advantages and disadvantages of developing a web based application?
List and explain five advantages and five disadvantages.
2. Differentiate between server-side and client-side scripting. Explain five items.
What is PHP?
PHP stands for PHP Hypertext Preprocessor.
Used to develop dynamic website
It is a server-side language.
The PHP script embedded in the web page.
The script is run (interpreted) on your web server, and the output from the process is
inserted to the web page as a part of the content before transmitted to the browser.
The script won’t be sent to the browser which request the web page, so the script is
not visible to the users.
It supports many database management system (Oracle, Postgre, DB2, Microsoft SQL
Server, etc).
And it’s free and powerful, that’s why PHP is very popular.
by apachefriends.org
The text will refer the XAMPP compilation tools for web development using
the server script interpreter and MySQL as the database server. These three
major tools are provided in the XAMPP and available for you in a single installation.
Web Application Dev using PHP & MySQL - All rights reserved (2016) KERUL.net Chapter 1:3
Chapter 1: PHP Intro
Before this, developer has to download and install 3 major applications for
developing web application using os/fs tools.
(Apache web server, MySQL database, and PHP interpreter)
phpDev combines three of them (plus few aditional software) in one installation.
download this compilation at http://www.apachefriends.org/en/xampp-
windows.html
Running XAMPP
After you downloaded and installed XAMPP for Windows on your system, turn on
all the server needed by clicking the
Start>Programs>XAMPP>Control Server Panel
***Pls stop the IIS service if you have installed it. Because Apache server is using
port 80 by default (similar as IIS).
After that, start the Apache server to use the web server application.
If you need to use MySQL, start the MySQL service.
The testing page will appear (if the installation succeed).
The web root is
c:\Program Files\xampp\htdocs\
Save all your php files inside
c:\Program Files\xampp\htdocs\yourFolder\
to create your own web application project.
To turn on/off the Apache
XAMPP Control Server Panel web server
To turn on/off the MySQL
For further documentation of XAMPP for Windows, go to :>database server
http://textbook.textpattern.net/wiki/index.php?title=Using_XAMPP_(Apache-MySQL-PHP-
Perl)_for_Windows To turn on/off the FileZilla
FTP server
Web Application Dev using PHP & MySQL - All rights reserved (2016) KERUL.net Chapter 1:4
Chapter 1: PHP Intro
mysql/data – where
MySQL store the database
records
Web Application Dev using PHP & MySQL - All rights reserved (2016) KERUL.net Chapter 1:5
Chapter 1: PHP Intro
Use your favorite web page editor such as Dreamweaver , or Notepad, or PHPDev
(phpdev.org), or Eclipse for PHP (easyeclipse.org). From my own experience,
FrontPage doesn’t support server side scripts very good. If you need to do PHP
development under Visual Studio, there is a PHP plugin you can download from .
Save the file inside the webroot of your web server as test.php. In this case, we
are using the XAMPP compilation. So by default the webroot is in
c:/Program Files/Xampp/htdocs
Output:
Go to your favorite web browser and type the address of your localhost plus the filename in
the address box. It would be;
http://localhost/test.php
Web Application Dev using PHP & MySQL - All rights reserved (2016) KERUL.net Chapter 1:6
Chapter 1: PHP Intro
References :
Sebesta, Robert W. 2003. Programming the World Wide Web. Pearson Education,
Inc.
http://wikipedia.org
http://apachefriends.org
http://dhost.info/kerul/webdev/
Web Application Dev using PHP & MySQL - All rights reserved (2016) KERUL.net Chapter 1:7