Introduction to  PHP

Introduction To PHP-ppt Download

  • Date:03 Feb 2021
  • Views:16
  • Downloads:0
  • Size:1.69 MB

Share Presentation : Introduction To PHP

Download and Preview : Introduction To PHP

Report CopyRight/DMCA Form For : Introduction To PHP


Transcription:

1.INTRODUCTION TOPHP

2.Server & Client Client: Your computerServer: Powerful &Expensive computer.Requires networkaccess

3.Static vs DynamicStatic DynamicShow case web sitesThe client asks the server for a web pageThe server answers back by sending the web pageStatic web pages are made by (X)HTML & CSS Most of web sites we use nowadaysThe client asks the server for a web pageThe server creates the page specially for the clientThe server sends the page that has been generatedDynamic web pages are made by (X)HTML, CSSPHP and MySQLhttp://blog.europcsolutions.com/php-introduction-to-php/

4.How PHP Works 1 4265 536 5 1. User request2. The request goes to webserver3. The request goes to PHPinterpreter4. The request is interpretedby PHP interpreter5. PHP interpreter processthe page by communicatingwith file system, databasesand email servers6. Deliver a web page to webserver to return to the userbrowser

5.PHP: Hypertext Preprocessor PHP is the Hypertext Preprocessor Script language Embedded into HTML Run as Apache module Can use DB (MySQL, Oracle, Microsoft SQL, PostgreSQL) Rich features: XML, PDF etc.,

6.Advantages of PHP FreePre-installed in Linux distributionsOpen SourceMultiplatformSimple, easy to learn and useProcedural language Compare with JavaScript which is event-driven C-like syntax - { } ;Extensive Function LibraryGood Web-server integration Script embedded in HTML Easy access to form data and output of HTML pages Not fully object-oriented Java is fully object oriented – all functions have to be in a class In PHP, classes are additional but quite simple to use

7.ArchitecturetouchBrowser(IE, FireFox,Opera)visionHTTPHTMLDesktop(PC or MAC)PHP scriptWeb Server(Apache, IIS)SQLDatabasetablesDatabaseServer

8.PHP: Variables, constant,operators and Control structures Variable var 123;Constant define(“Zipcode", 40508);Operators Assignment (e.g. , , * ) Arithmetic (e.g. , -, *) Comparison (e.g. , , , ) Logical (e.g. !, &&, )Control Structures Conditional (branching) structures (e.g. if/else) Repetition structures (e.g. while loops).

9.Datatypes Boolean Integer truefalse1000x34Floating pointArray array(“lexington", “hanoi", "london")array(“kentucky" “lexington", "vietnam" "hanoi", "england" "london") a[2] a["vietnam"]

10.String Data typeA string is a sequence of chars stringTest “this is a sequence of chars”;echo stringTest[0]; //output: techo stringTest; //output: this is a sequence of charsA single quoted strings is displayed “as-is” age 37; stringTest 'I am age years old'; // output: I am age years old stringTest “I am age years old”; // output: I am 37 years oldConcatenation conc ”is “.”a “.”composed “.”string”;echo conc; // output: is a composed string newConc 'Also conc '. conc;echo newConc; // output: Also conc is a composed string

11.Example ?phpPHP CODE GOES IN HERE? IP address: 172.31.40.119 (Need to be in UK network to access)

12.FORM Handling GET GET['name']POST POST['name']

13.FORM Handling Example form action "test.php" method "post" table tr th Name: /th td input type "text" name "name" /td /tr tr th Age: /th td input type "text" name "age" /td /tr … /table /form HTML FORMname:age:Kausalya22submittest.php ? p Hello ? POST['name']? .You are ? POST['age']? years old. /p ? PHPHello Kausalya.You are 22 years old.

14.Example(2) – Loop manipulations

15.Output

16.While Loops

17.Arrays and Functions

18.Output

19.Returning Values from Functions

20.New Output

21.Including Files Simple use the include keyword and use thepath to the file you wish to include.Step 1: Create the file you wish to include.This example holds navigational links.

22.Step 2: Include the File in Code

23.New, Consistent Output

24.Function 1 (NoParameters)

25.Output (Function 1)

26.Function 2 (Pass byValue)

27.Output (Function 2)

28.Function 3 (Pass byReference)

29.Output (Function 3)

30.References Websites http://www.acm-ou.org www.php.net www.phparchitect.com www.google.com www.tom.sfc.keio.ac.jp/ hagino/itss/ csmaster.sxu.edu/appel/web550 http://www.phpbuilder.com/ http://www.devshed.com/ http://www.phpmyadmin.net/ http://www.hotscripts.com/PHP/ http://www.mysql.com/ http://www.owasp.org/ www.textsandtech.org/ rudy/phpdemo1 http://www.webreference.com/programming/php/by example2/5.html Books PHP and MySQL Web Development 2nd Edition, Welling & Thomson Web Database Applications with PHP & MySQL, O’Reilly Publishers PHP Cookbook, O’Reilly Publishers MySQL Cookbook, O’Reilly Publishers “PHP and MySQL Web Development”, Luke Welling and Laura Thomson, SA Listservs thelist, http://lists.evolt.org/ (Note: very general and large volume of email)

31.


PHP and MySQL Web Development 2nd Edition, Welling & Thomson Web Database Applications with PHP & MySQL, O’Reilly Publishers PHP Cookbook, O’Reilly Publishers

Related Presentations

PHP An Introduction

service support education extensions open source companies IBM uses and develops Apache and Linux; created Secure Mailer and created other software on AlphaWorks Apple released core layers of Mac OS X Server as an open source BSD operating system called Darwin; open sourcing the QuickTime Streaming Server and the OpenPlay network gaming toolkit ...

34 Views0 Downloads

Introduction to PHP

Data Types (1) PHP has eight different data types – 5 basic and 2 composite types and 1 resource type. The 5 basic data types are: integers: whole numbers in the range -2,147,483,648 to +2,147,483,647 on 32-bit architecture.

26 Views0 Downloads

Introduction to PHP Chakarov

PHP: Introduction By Trevor Adams Topics Covered Server side web programming Client/Server systems Comparison with static HTML PHP - what is it? What does it do? PHP Language basics Syntax Variables, Constants, Operators Decision making PHP and the client Client/Server on the WWW Standard web sites operate on a request/response basis A user ...

17 Views0 Downloads

Introduction to PHP University of Michigan

Introduction to PHP Dr. Charles Severance www.php-intro.com Note from Chuck. If you are using these materials, you can remove my name and URL from this replace it with your own, but please retain the CC-BY logo on the first page as well as retain the entire last page when you remix and republish these slides.

9 Views0 Downloads

Introduction to PHP instesre org

Introduction to PHP – Chapter 8 Working with PHP JavaScript vs. PHP PHP scripts are similar to JavaScript scripts, but be careful with syntax! PHP variables always begin with a “$” symbol. There is no equivalent to JavaScript’s “var” data declaration. PHP scripts are embedded within a <?php … ?> tag.

7 Views0 Downloads

Introduction to PHP Mahasarakham University

Web Development. FINAL 50%. Week5-6. Web Services. XML. Web Service Client. Web Service Server. Web2.0 Mashup. Week7. PHP template with Smarty

11 Views0 Downloads

Introduction to PHP WA4E

Introduction to PHP Last modified by: Sue Blumenberg Document presentation format: On-screen Show (16:9) Other titles: Helvetica MS Pゴシック Arial Gill Sans Lucida Grande ヒラギノ角ゴ ProN W3 Courier 1_Office Theme Office Theme PHP Arrays PHP Arrays Rock! Associative Arrays Integer Indices Key / Value Dumping an Array var_dump vs ...

14 Views0 Downloads

Introduction to PHP WPI

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 executed each time the page is visited. Your PHP code is interpreted at the Web server and generates HTML or other output that the visitor will see” (“PHP and MySQL Web Development ...

12 Views0 Downloads

Introduction to Server Side Development with PHP

PHP Comments. The types of comment styles in PHP are: Single-line comments. Lines that begin with a # are comment lines and will not be executed. Multiline (block) comments. These comments begin with a /* and encompass everything that is encountered until a closing */ tag is found. End-of-line comments

12 Views0 Downloads

Introduction to PHP and MySQL

Title: Introduction to PHP and MySQL Author: Lisa Dipippo Last modified by: Lisa DiPippo Created Date: 10/21/2003 8:11:01 PM Document presentation format

6 Views0 Downloads

PHP MySQLPart 2 WordPress com

Advanced PHP. PHP includes. Including an external phpor html file in your PHP page – useful for reusing code/functions in many pages (navigational columns, database connections, session/cookie retrieval and validation etc…)

29 Views0 Downloads

PHP faculty utrgv edu

PHP History. Started as Personal Home Page Tools (PHP Tools) in 1995 with a goal to create a guestbook by gathering information from an online form and displaying it on a web page. The ability to communicate with a database was later added. With v3 in 1998, the name dropped since it sounded more of a hobbyist’s term.

45 Views0 Downloads