Development
ICT311(3)
Prerequisites to PHP
HTML
CSS
Java Script
MySQL
Recommended Reading
http://php.net
http://www.w3schools.com/php/
Web Development
Web development is a work involved in developing a
web site
Developing the simplest static single page to the most
complex web sites.
Ex-: web-based internet applications, electronic
businesses, social network services, etc.
web development commonly refers web engineering,
web design, web content development, clientside/server-side scripting, web server and network
security configuration, and e-commerce development.
Contd
Among web professionals, "web
development" usually refers to the main
non-design aspects of building web sites:
writing markup and coding.
Most recently Web development has come
to mean the creation of content
management systems or CMS.
Static Vs Dynamic
Find what are the differences of static
& dynamic web development.
JavaScript
Java
Python
CSS
PHP
Ruby
C++
C
C#
Objective C
Perl
Etc
Freeware
Visual Studio Express, Google Wed
Designer, Html-Kit, etc
Commercial
Adobe Dreamweaver, Komodo IDE,
Visual Studio, etc
What is PHP?
Hypertext Processor
Open source Server-side Language
Widely used for web development
Easy to embed into HTML
Example
<html>
<head>
<title></title>
</head>
<body>
<?phpecho'<p>HelloWorld</p>';?>
</body>
</html>
Setting up PHP
1. Install a server (Apache, IIS)
2. Install PHP
3. Install database (MySQL, MariaDB,
Oracle, Microsoft SQL, etc)
Configuration on Windows
Download all-in-one package
(WAMP, XAMPP)
PHP Syntax
<?php
// php code here
?>
.php extension used to save PHP file.
Ex-: index.php, about-us.php
Example
<?php
echo I am learning PHP;
?>
<?php
echo $_SERVER[HTTP_USER_AGENT];
?>
<?php
echo $_SERVER[REMOTE_ADDR];
?>
Variables
Variable refers as a data holder or
container.
It can store data and can reuse again
and again.
Data can be a number or a string.
$no = 1;
$userName = Bernard;
or
Concatenation in PHP
Used to combine strings together.
Dot sign (.) use as concatenate
operator.
Ex-:
echo "php" . " " . "is" . " " . "easy" . " " . "to". " ".
"learn";
$age = 60;
echo "I'm" ." ". $age ." ". "years old!";