Learning PHP: Programming Review. PHP is one of many programming languages Different languages have their advantages and disadvantages and are therefore.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Basic Response Letter Last Updated Basic Response Letter The response redesign in SERFF 5.6 introduces the concept of inline schedule item.
MIS 3200 – Unit 4 Complex Conditional Statements – else if – switch.
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 The Basic PHP. Out line o History of PHP o What is PHP? o Why PHP ? o What you need to start using PHP ? o What does PHP code look like? o Syntax.
ITC 240: Web Application Programming SUBHASH PRAJAPATI 04/14/15.
Website Development Introducing PHP The PHP scripting language Syntax derives from C, Java and Perl Open Source Links to MySql database.
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
New Student Orientation Registration System Stephen Nakamura EE496 Final Presentation Fall 2008.
CIS101 Introduction to Computing Week 12 Spring 2004.
PHP Basics 1 ICS213, 1 / 2011 Dr. Seung Hwan Kang 1.
So – You want to learn how to put an advanced article submission (cut and paste) onto the state website. (Note: If you have not done so, you will need.
Intro to PHP at Winthrop CSCI 297 Scripting Languages Day One.
Web forms in PHP Forms Recap  Way of allowing user interaction  Allows users to input data that can then be processed by a program / stored in a back-end.
PHP : Hypertext Preprocessor
Week 4  Using PHP with HTML forms  Form Validation  Create your own Contact form Please Visit:
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
(c) Manzur Ashraf, Short course, KFUPM PHP & MySQL 1 Basic PHP Class 2.
Lab Assignment 7 | Web Forms and Manipulating Strings Interactive Features Added In this assignment you will continue the design and implementation of.
Advanced Web 2012 Lecture 4 Sean Costain PHP Sean Costain 2012 What is PHP? PHP is a widely-used general-purpose scripting language that is especially.
Welcome to the Second Tutorial Welcome to the second part of this communication system website tutorial! This tutorial is for church planters. When you.
ITD 3194 Web Application Development Chapter 4: Web Programming Language.
2010/11 : [1]Building Web Applications using MySQL and PHP (W1)PHP Recap.
To create an account or sign in, use either of these links.
PHP. Why should we learn web programming? No need write socket programming. - You can forget TCP/IP & OSI layers. - Web server handles socket tasks for.
INTERNET APPLICATION DEVELOPMENT For More visit:
Career Services Center Employer Training. This is the main login page. The link can be found at Employers.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
Week 9 PHP Cookies and Session Introduction to JavaScript.
Web Design and Development for E-Business By Jensen J. Zhao Copyright 2003 Prentice Hall, Inc. Web Design and Development for E-Business Jensen J. Zhao.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
1 PROJECT 6 SPREADSHEET BASICS Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall, Inc.
NMD202 Web Scripting Week3. What we will cover today Includes Exercises PHP Forms Exercises Server side validation Exercises.
CONTROL STRUCTURE The if, elseif, and else & switch Statements 1.
Definition CSS “Short for Cascading Style Sheets, a new feature being added to HTML that gives both Web site developers and users more control over how.
Intro to DatabasesClass 4 SQL REVIEW To talk to the database, you have to use SQL SQL is used by many databases, not just MySQL. SQL stands for Structured.
Web Programming Language Week 5 Dr. Ken Cosh Introducing PHP 1.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
Session Three Review & Conditional Control Flow. Java File Hierarchy Projects Packages Classes Methods.
Introduction to Web Programming. Introduction to PHP What is PHP? What is a PHP File? What is MySQL? Why PHP? Where to Start?
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
Lecture 2 Conditional Statement. chcslonline.org Conditional Statements in PHP Conditional Statements are used for decision making. Different actions.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Since you’ll need a place for the user to enter a search query. Every form must have these basic components: – The submission type defined with the method.
CST336, Dr. Krzysztof Pietroszek Week 2: PHP. 1.Introduction to PHP 2.Embed PHP code into an HTML web page 3.Generate (output HTML) web page using PHP.
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
 A PHP script can be placed anywhere in the document.  A PHP script starts with  The default file extension for PHP files is ".php".  A PHP file normally.
CSE 250 Spring  Can use either Eclipse plugin or web interface  For Eclipse, make sure all the files you want to submit are in the same project.
Basic Scripting & Variables Yasar Hussain Malik - NISTE.
These Guys? Wait, What? Really?  Branching is a fundamental part of programming  It means taking an action based on decision  The decision is dependent.
PHP Form Processing * referenced from
USING CONDITIONAL CODE AMIR KHANZADA. Conditional Statement  Conditional statements are the set of commands used to perform different actions based on.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
PHP WORKSHOP (Session 1) INFO 257 Supplement. Outline What is PHP ? PHP Language Basics PHP Exercise.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Journal of Mountain Science (JMS)
>> Fundamental Concepts in PHP
Exercise : Write a program that print the final price of purchase at a store where everything costs exactly one dollar. Ask for the number of items purchased.
Introducing Instructions
CHAPTER 5 SERVER SIDE SCRIPTING
Required Data Files Review
Web Technologies PHP 5 Basic Language.
Iterations Programming Condition Controlled Loops (WHILE Loop)
Using the Vendor Portal
1. Log in to AsknLearn Portal at: lms.asknlearn.com/BRPS
PHP: Database connection
This is an introduction to JavaScript using the examples found at the CIS17 website. In previous examples I specified language = Javascript, instead of.
Southwest college Registration instructions
Intro to Programming (in JavaScript)
Presentation transcript:

Learning PHP: Programming Review

PHP is one of many programming languages Different languages have their advantages and disadvantages and are therefore suited for different jobs PHP is most commonly used to process data on web servers

Variables These are used to contain data They must be identified by a name In some languages it is necessary to provide a data type when declaring a variable PHP is sometimes referred to as a loosely typed language because it doesn’t have many of these more strict requirement Format for declaring a variable is: $name;

Assigning a Value Use the = operator $welcome_text = "Hello and welcome to my website."; $user_id = 987;

Selection/Decision Making All programming languages make use of a decision making construct The general format in php is as follows: if (condition) { body }

Examples if ($username == "webmaster") { echo "Please enter your password below"; } if ($username == "webmaster") { echo "Please enter your password below"; } else { echo "We are sorry but you are not a recognised user"; }

if ($enteredpass == $password){} if ($age < 13) if ($name == "" || $ == "" || $password == "") { echo "Please fill in all the fields"; }

PHP Comparison Operators Comparison Operators ExampleNameResult $a == $bEqualTRUE if $a is equal to $b after type juggling. $a === $bIdenticalTRUE if $a is equal to $b, and they are of the same type. $a != $bNot equalTRUE if $a is not equal to $b after type juggling. $a <> $bNot equalTRUE if $a is not equal to $b after type juggling. $a !== $bNot identicalTRUE if $a is not equal to $b, or they are not of the same type. $a < $bLess thanTRUE if $a is strictly less than $b. $a > $bGreater thanTRUE if $a is strictly greater than $b. $a <= $bLess than or equal toTRUE if $a is less than or equal to $b. $a >= $bGreater than or equal toTRUE if $a is greater than or equal to $b.

Logical Operators ExampleNameResult $a and $bAndTRUE if both $a and $b are TRUE. $a or $bOrTRUE if either $a or $b is TRUE. $a xor $bXorTRUE if either $a or $b is TRUE, but not both. ! $aNotTRUE if $a is not TRUE. $a && $bAndTRUE if both $a and $b are TRUE. $a || $bOrTRUE if either $a or $b is TRUE.

Mix ‘n’ Match PHP and HTML PHP blocks can be included inside of HTML The file must still be saved with.php to be considered PHP Example: My Example Here is some more HTML

Comments

Exercises 1.Create a form to gather the following information: name and password. Upon submission of the form check that the password is “1zx234” and inform the user if they entered it correctly (use their name in the response). Link under Unit 1 My Work. 2.Create a form that allows a user to enter the cost of 4 items. Upon submission, calculate the cost, including taxes. Display the subtotal and total with taxes. Provide a 2% discount on a final total exceeding $ Make sure to display the discount amount and the new total minus the discount. Link under Unit 1 My Work.