Post-Module PHP Introduction BTM 395: Internet Programming.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Protecting the code of Web Applications
Javascript Introduction Norman White Material is from w3schools.com Go there to run examples interactively.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic JavaScript: Introduction to Scripting.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
IST 221 Internet Concepts and Applications Introduction to PHP.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
Guide To UNIX Using Linux Third Edition
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
1.7 Arrays academy.zariba.com 1. Lecture Content 1.Basic Operations with Arrays 2.Console Input & Output of Arrays 3.Iterating Over Arrays 4.List 5.Cloning.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
CST JavaScript Validating Form Data with JavaScript.
MS3304: Week 4 PHP & HTML Forms. Overview HTML Forms elements refresher Sending data to a script via an HTML form –The post vs. get methods –Name value.
Post-Module PHP Forms BTM 395: Internet Programming.
INTERNET APPLICATION DEVELOPMENT For More visit:
Chapter 4 – The Building Blocks Data Types Literals Variables Constants.
WEB DESIGN AND PROGRAMMING Introduction to Javascript.
Tutorial 14 Working with Forms and Regular Expressions.
University of Sunderland Lecture 1 Internet Software Architectures Lecture 1: Introduction.
© 2004 – 2014 Web Site Optimizers, LLC 1 HTML5 Forms Make Life Easy For Your Mobile Users Tom Bowen President Web Site
School of Computing and Information Systems CS 371 Web Application Programming PHP - Basics Serving up web pages.
WEEK 3 AND 4 USING CLIENT-SIDE SCRIPTS TO ENHANCE WEB APPLICATIONS.
1 Introduction to Javascript Peter Atkinson. 2 Objectives To understand and use appropriately some of the basic elements of Javascript: –alert and prompt.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
Javascript. Outline Introduction Fundamental of JavaScript Javascript events management DOM and Dynamic HTML (DHTML)
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
November 2003Bent Thomsen - FIT 6-11 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
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.
Using Client-Side Scripts to Enhance Web Applications 1.
Chapter 5: Windows and Frames
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
ITM © Port, KazmanVariables - 1 ITM 352 Expressions, Precedence, Working with Strings.
Post-Module JavaScript BTM 395: Internet Programming.
3 1 Sending Data Using an Online Form CGI/Perl Programming By Diane Zak.
Week 4 PHP H ypertext P reprocessor Reference : Official Site :
Data TypestMyn1 Data Types The type of a variable is not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
JSON and A Comparison of Scripts. JSON: JavaScript Object Notation Based on a subset of the JavaScript Programming Language provides a standardized data.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
1 Scripting Languages VBScript - Recognized mainly by Internet Explorer only - Netscape does have a plug-in JavaScript - Recognized by Internet Explorer.
Files: By the end of this class you should be able to: Prepare for EXAM 1. create an ASCII file describe the nature of an ASCII text Use and describe string.
4. Javascript M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer (C-307) Desain.
Website design and structure. A Website is a collection of webpages that are linked together. Webpages contain text, graphics, sound and video clips.
CIS 3.5 Lecture 2.3 "Introduction to JavaScript".
Lesson 16. Practical Application 1 We can take advantage of JavaScript and the DOM, to set up a form so that the first text box of a form automatically.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
11 – Introduction to PHP(1) Informatics Department Parahyangan Catholic University.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
JavaScript Tutorial First lecture 19/2/2016. Javascript is a dynamic computer programming language. It is lightweight and most commonly used as a part.
ITM 352 Expressions, Precedence, Working with Strings Class #5
Web Systems Development (CSC-215)
Web Systems Development (CSC-215)
WEB PROGRAMMING JavaScript.
Web DB Programming: PHP
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Intro to PHP.
Introduction to JavaScript
Presentation transcript:

Post-Module PHP Introduction BTM 395: Internet Programming

PHP string quoting ' (single quote): for literal strings with minimal text expansion (\\ and \' only) " (double quote): for flexible strings with expansion of variables and many codes (e.g. \n and \t) Heredoc: for lengthy strings with complex plain-text format (see –Begins with <<<ANY_DELIMITER –Ends with ANY_DELIMITER; as the only contents of closing line –Expands variables similarly to " –Advantage: no need to escape ' or " –Nowdoc format works like single quote equivalent of heredoc Official reference:

Array indexing ALL arrays in PHP are associative arrays Numeric indices are automatically generated, but the arrays are still fully associative Arrays can have both flexible associative keys and auto-generated numeric keys Official reference:

Customized array sorting PHP has many built in array sort functions, for sorting by value, by key, and backwards JavaScript only has one very limited built-in sort: lexicographic (strict alphabetic) sort Both have custom sort functions that work similarly –JavaScript: myArray.sort(function(a,b){…});JavaScript –PHP:usort($myArray,customSortFunction); customSortFunction(a,b){…};PHP –These can sort any kind of array anyway you like, including multidimensional arrays

Other PHP tips Equality and assignment = vs == vs === The ternary (conditional) operator ? : –$myVar = $testCondition ? $valueIfTrue : $valueIfFalse; –Ternary operator exerciseTernary operator exercise Stop an infinite loop in PHP –Click the stop or cancel button on your browser to stop the page loading –Or just wait 30 seconds or so for a server timeout

Sources Heredoc example: