Web Technologies PHP 5 Basic Language.

Slides:



Advertisements
Similar presentations
JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Advertisements

1 PHP Statement Constructs Server Scripting. 5-2 Basic Statement All Statements end in a semicolon. Statements are delimited from the HTML code by enclosing.
PHP Overview CS PHP PHP = PHP: Hypertext Preprocessor Server-side scripting language that may be embedded into HTML One goal is to get PHP files.
PHP MOHAMMED SHURRAB TO MISS/ RASHA ATTALLAH. What is PHP? Stands for "PHP Hypertext Preprocessor" Server-side scripting language HTML-embedded Supports.
Chapter 4 – The Building Blocks Data Types Literals Variables Constants.
Chap 3 – PHP Quick Start COMP RL Professor Mattos.
Chapter 2 Basic Elements of Java. Chapter Objectives Become familiar with the basic components of a Java program, including methods, special symbols,
1 Session 3: Flow Control & Functions iNET Academy Open Source Web Programming.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Introduction to PHP A user navigates in her browser to a page that ends with a.php extension The request is sent to a web server, which directs the request.
PHP - Basic Language Constructs CSCI 297 Scripting Languages - Day Two.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
PHP Teresa Worner. What is it? PHP: Hypertext Preprocessor server-side scripting language open source cross-platform compatible with almost all servers.php.php3.phtml.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
PHP Arūnas Liuiza. PHP 101 What is PHP? Widely popular dynamic interpreted opensource programming language, aimed for web development Syntax is simmilar.
Comments in PHP In PHP, we use // to make a singleline comment or /* and */ to make a large comment block. Comment is a part of your PHP code that will.
PHP - 1h. How it works Client requests document Server loads document in memory Server processes document with relevant module (PHP) Server sends XHTML.
Creating PHP Pages Chapter 6 PHP Variables, Constants and Operators.
PHP Programming with MySQL Slide 3-1 CHAPTER 3 Working with Data Types and Operators.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP Basics.
Chapter 1 Introduction to PHP Part 1. Textbook’s Code DOWNLOADS PHP and MySQL for Dynamic Web Sites Complete Set of Scripts.
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Basic Scripting & Variables Yasar Hussain Malik - NISTE.
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.
Radoslav Georgiev Telerik Corporation
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
PHP using MySQL Database for Web Development (part II)
Oleh: Ahmad Ramadhani, S.Kom
Web Systems & Technologies
Remote hosts and web servers
CGS 3066: Web Programming and Design Spring 2017
Session 2 Basics of PHP.
Pemrograman WEB I Pertemuan 6.
Test 2 Review Outline.
PHP (Session 1) INFO 257 Supplement.
PHP for Server-Side Programming
Receiving form Variables
Variables Variables are used to store data or information.
CS 371 Web Application Programming
Elementary Programming
เอกสารประกอบการบรรยายรายวิชา Web Technology
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Introduction to PHP Part 1
DBW - PHP DBW2017.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
PHP (PHP: Hypertext Preprocessor)
Passing variables between pages
C Basics.
Web Programming– UFCFB Lecture 19-20
PHP FORM HANDLING Post Method
String Conversion and Type Juggling
Java Programming: From Problem Analysis to Program Design, 4e
Chapter 19 JavaScript.
Introduction to Web programming
Ch. 3. PHP (이 강의 내용의 대부분 예들은 w3schools. com/php/default
JavaScript and Ajax (Expression and Operators)
Software Engineering for Internet Applications
PHP.
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Web Programming Language
Fundamental Programming
PHP an introduction.
PHP Lecture 11 Kanida Sinmai
PHP Language Basics.
Algoritma & Pemrograman 1
LOOPING STRUCTURE Chapter - 7 Padasalai
Variables and Constants
Form Design & Validation
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

Web Technologies PHP 5 Basic Language

Objectives Write PHP code to perform a specific task. Resolve problems in a PHP program. Write PHP functions to perform specific tasks. Chapter 2: PHP 5 Basic Language Chapter 3: PHP 5 OO Language

PHP 5 Basic Language HTML EMBEDDING

PHP 5 Basic Language Comments

PHP 5 Basic Language Variables Variable names always begin with a dollar sign ($) and are case-sensitive

PHP 5 Basic Language Managing Variables Isset() — Determine if a variable is set and is not NULL Unset() — Unset a given variable

PHP 5 Basic Language empty() — Determine whether a variable is empty isset() - returns true only when the variable is not null. empty() - returns true if the variable is an empty string, false, array(), NULL, “0?, 0, and an unset variable.

PHP 5 Basic Language SuperGlobals

Example <html> <body> <form action="welcome.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type="text" name="email"><br> <input type="submit"> </form> </body> </html>

Example <html> <body> Welcome <?php echo $_POST["name"]; ?><br> Your email address is: <?php echo $_POST["email"]; ?> </body> </html>

Example

PHP 5 Basic Language Basic Data Types Integer Floating Point Numbers Strings Booleans Null

PHP 5 Basic Language Arrays The array() construct creates an array

PHP 5 Basic Language We can identify by position (a number beginning from zero) or some identify name

PHP 5 Basic Language Reading array values

PHP 5 Basic Language Accessing Nested Arrays

PHP 5 Basic Language Traversing Arrays Using foreach()

PHP 5 Basic Language Traversing Arrays Using list() and each()

PHP 5 Basic Language Constants once set, the value of a constant cannot change. They are set using the define() function.

PHP 5 Basic Language Operators Numerical Operators Assignment Operators Comparison Operators Logical Operators Bitwise Operators Negation Operators Increment/Decrement Operators The Cast Operators The Silence Operator

PHP 5 Basic Language CONTROL STRUCTURES

PHP 5 Basic Language CONTROL STRUCTURES

PHP 5 Basic Language Loop Control Structures

PHP 5 Basic Language Loop Control Structures

PHP 5 Basic Language Code Inclusion Control Structures

PHP 5 Basic Language FUNCTIONS

PHP 5 Basic Language FUNCTIONS

PHP 5 Basic Language Returning Values By Reference

PHP 5 Basic Language Declaring Function Parameters By-Value Parameters By-Reference Parameters

PHP 5 OO Language Write a Class

PHP 5 OO Language final Classes

IT230 – Week 12 Thanks,