PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in 1995. PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).

Slides:



Advertisements
Similar presentations
IS 6116 Introduction – 10 Jan Lecturer Details Aonghus Sugrue Website: aonghussugrue.wordpress.com
Advertisements

PHP I.
Agenda Web Application Web Page development WAMP
1 Database Driven Web Application Clients Application Servers including web servers Database Server Traditional client-server (2-tier architecture): client:
Introduction to PHP (Part-1) Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
SYST Web Technologies SYST Web Technologies Installing a Web Server (XAMPP)
Web Page A page displayed by the browser. Website Collection of multiple web pages Web Browser: A software that displays web pages on client computer.
PHP and MySQL Week#1  Course Plan.  Introduction to Dynamic Web Content.  Setting Up Development Server Eng. Mohamed Ahmed Black 1.
PHP Programming. Topics Background and History of PHP Installation Comments in PHP Variables Conditions Loops Functions File Handling Database Handling.
Introduction to PHP. PHP PHP is the Hypertext Pre-processor –Script language –Embedded into HTML –Runs as Apache module –Can use DB (MySQL, Oracle, Microsoft.
CSC 318 WEB APPLICATION DEVELOPMENT.  Introduction to Server Scripting language  Client VS Server  Introduction to PHP  PHP Files and Syntax  Function.
Intro to PHP Introduction to server-side scripts (It’s all good :D) © TAFE NSW
PHP HYPERTEXT: PREPROCESSOR By: Justin T. Pleva. WHAT IS PHP?  General purpose  Server-side web development  Console application.
Powerpoint Templates Page 1 Powerpoint Templates Web Programming PHP MySql Ikbal Jamaludin.
Programming with php By: Seth Larson. A little bit about PHP  PHP stands for PHP:  Hypertext Preprocessor  PHP is a widely-used general-purpose server-side.
ITD 3194 Web Application Development Chapter 4: Web Programming Language.
Mandakini Ayushi Infotech Mandakini Kumari 22 nd July PHP Basic.
PHP - Hypertext Preprocessor. Introduction PHP is a powerful server-side scripting language for creating dynamic and interactive websites. PHP is a powerful.
SCV1223 PHP - Hypertext Preprocessor. Introduction PHP is a powerful server-side scripting language for creating dynamic and interactive websites. PHP.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
INTERNET APPLICATION DEVELOPMENT For More visit:
Nael Alian Introduction to PHP
PHP With Oracle 11g XE By Shyam Gurram Eastern Illinois University.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Multifarious Project A personal -system Team Members Abdullah Alghamdi Metaib Alenzai Mohammed Alshehri Hamd Alshamsi.
PHP OVERVIEW. C ONTENT Introduction of PHP History and development Basics of PHP programming.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
PHP. What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Introduction to PHP Advanced Database System Lab no.1.
What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports.
Introduction to Web Programming. Introduction to PHP What is PHP? What is a PHP File? What is MySQL? Why PHP? Where to Start?
WEB DEVELOPMENT WITH PHP/MYSQL. WEB DEVELOPMENT COURSE HAS DIFFERENT NAME IN DIFFERENT INSITUTES, THIS IS A CORE COURSE FOR BS/MS STUDENTS. THIS IS ALSO.
Introduction to PHP.
IT ELECTIVE 2.  Web server Can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that.
PHP Introduction PHP is a server-side scripting language.
Unit 1 – Web Concepts Instructor: Brent Presley.
1 PHP Pattadon Sintusak ID PHP Programmingintroduction2 Content History of PHP What’s PHP? Purpose of PHP Structure of PHP Language Reference.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
By bscshelp.com 1.  It is a group assignment.  Complete Website design Using Html and Css.  Due date: 10 th December, 2014 (Hard Deadline) 2.
PHP stands for …….. “PHP Hypertext Pre-processor” and is a server-side scripting language like ASP. PHP scripts are executed on the server PHP supports.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
1 Server Side scripting PHP. 2 What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are.
Introduction to PHP. PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
A pache M ySQL P hp Robert Mudge Reference:
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
Introduction to Dynamic Web Programming
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be.
PHP (PHP: Hypertext Preprocessor)
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be.
PHP Introduction.
IntroductionToPHP Static vs. Dynamic websites
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
Introduction to PHP.
PHP an introduction.
PHP By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and.
Presentation transcript:

PHP By Dr. Syed Noman Hasany

PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym). Hypertext is the underlying concept defining the structure of the World Wide Web, is the text displayed on a computer or other electronic device with references (hyperlinks) to other text. PHP has term “preprocessor” because PHP libraries are already compiled and processed. when any person request any PHP page in browser address bar that request first go to server for example Apache which interprets PHP files and return back response in form of HTML.

PHP PHP is a server-side scripting language, like ASP An embedded scripting language for HTML. PHP scripts are executed on the server PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) PHP is an open source software, so it is free to download and use

PHP file PHP files can contain text, HTML tags and scripts PHP files are returned to the browser as plain HTML

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 easy to learn ( syntax like C) and runs efficiently on the server side

MySQL MySQL is a database server MySQL is ideal for both small and large applications MySQL supports standard SQL MySQL compiles on a number of platforms MySQL is free to download and use

PHP + MySQL + Apache PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform) To get access to a web server with PHP support, you can: Install Apache on your own server, install PHP, and MySQL Wamp server: All in one download and installation for Windows (visual C is needed) – – Redistributable-Package-x86/ _ html Redistributable-Package-x86/ _ html

Installing Wamp If the installation went well, you should have an new icon in the bottom right, where the clock is:

Localhost Localhost just refers to the server running on your own computer. Another way to refer to your server is by using the IP address

Running PHP scripts Suppose created php script name is first.php √ if a folder under www contains the file, then: √ Wrong formats: ×c:/wamp/www/test1.php ×

Basic PHP Syntax A PHP script starts with and can be placed anywhere in the document. On servers with shorthand-support,, but not recommended due to possible xml conflicts.

PHP Comments All php files are saved with extension.php Can be written in notepad or any text editor Single line comment – // this is single line comment Multi line comment – /*…. This is a multi line comment */

A PHP script The above program will display hello in the browser

Example 1: title Example

Variables Case sensitive Variables start with a $ symbol Variables can contain _ or numbers or alphabets $ should be followed by _ or alphabet and not by a number PHP is loosely typed language. There is no strict data typing Variable can be assigned with any values

Example 2 <?php echo "hello PHP"; $txt="Hello World!"; $x=16; echo $txt, $x; ?>

Conditions If else if(condn) {….} elseif(condn) {….} else { ….} Switch case switch(var) { case c1: statements;break. Default: statements; break; }

Example 3 "; echo “ Good bye”; } else { echo "Have a nice day!"; } ?> Extract 3 character value from the system date newline

Loops For for(intialisation;condition;increment/decrement) { statements } While while(condn) { ….} Do While do {….} while(condn);

Example 4 "; echo "The number is ". $i. " "; } while ($i, or. (dot) as concatenation operator