PHP Training Senior Design team Ongo8 Sunday October 16, 2005.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Introduction to JavaScript
George Mason University
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
IST 221 Internet Concepts and Applications Introduction to PHP.
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
Server side basics.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
PHP Workshop ‹#› PHP: The Basics. PHP Workshop ‹#› What is it? PHP is a scripting language commonly used on web servers. –Stands for “PHP: Hypertext Preprocessor”
PHP: Hypertext Processor Fred Durao
1 Introduction to PHP. 2 What is this “PHP” thing? Official description: “PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used Open Source.
Copyright © Curt Hill PhP History and Introduction.
Lecture 6 – Form processing (Part 1) SFDV3011 – Advanced Web Development 1.
PHP H ypertext P re-processor. Unit 6 - PHP - Hello World! - Data types - Control structures - Operators.
University of Sunderland Lecture 1 Internet Software Architectures Lecture 1: Introduction.
INTERNET APPLICATION DEVELOPMENT For More visit:
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
Nael Alian Introduction to PHP
Chap 3 – PHP Quick Start COMP RL Professor Mattos.
A little PHP. Enter the simple HTML code seen below.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
PHP By Sergio Rodriguez By Sergio Rodriguez. PHP G PHP: Hypertext Preprocessor G Scripting language G PHP: Hypertext Preprocessor G Scripting language.
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.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
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.
PHP PHP: Hypertext Preprocesor Personal Home Page Tools.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Introduction to PHP Advanced Database System Lab no.1.
PHP Arūnas Liuiza. PHP 101 What is PHP? Widely popular dynamic interpreted opensource programming language, aimed for web development Syntax is simmilar.
USING UNITY JAVASCRIPT. CONVENTIONS AND SYNTAX IN JAVASCRIPT Case Sensitivity All keywords like var or function must be in lowercase. All variable names,
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.
Week 4 PHP H ypertext P reprocessor Reference : Official Site :
Strings, output, quotes and comments
PHP - 1h. How it works Client requests document Server loads document in memory Server processes document with relevant module (PHP) Server sends XHTML.
JavaScript Syntax, how to use it in a HTML document
©John Samuel 2008 Introduction to PHP. ©John Samuel 2008 Objectives At the end of this class the student will be able to; Create and run a simple php.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Introduction to Perl. What is Perl Perl is an interpreted language. This means you run it through an interpreter, not a compiler. Similar to shell script.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
Creating Web Documents: JavaScript Ftp / file management: review Introduction to JavaScript Sources Homework: start review for midterm, work on Project.
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
PHP Syntax You cannot view the PHP source code by selecting "View source" in the browser - you will only see the output from the PHP file, which is plain.
©John Samuel 2008 Introduction to PHP Note: These slides are not included in coverage for the BIF703 final exam...
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.
PHP Form Processing * referenced from
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,
PHP Overview. What is PHP Widely available scripting language Free Alternative to Microsoft’s ASP Runs on the Web Server; not in the browser Example:
CGS 3066: Web Programming and Design Spring 2016 PHP.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
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.
1 How to Publish Your HTML Page on the Web. Every USF Student has a website 2 Your Net ID You have a directory on the server.
PHP using MySQL Database for Web Development (part II)
HTML & teh internets.
Example of a table. Note that I looked at an example under CIS44.
PHP Hypertext Preprocessor
PHP (PHP: Hypertext Preprocessor)
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
Web Systems Development (CSC-215)
Recap Week 2 and 3.
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Intro to Programming (in JavaScript)
Workshop for Programming And Systems Management Teachers
Presentation transcript:

PHP Training Senior Design team Ongo8 Sunday October 16, 2005

Development Environment 1/2  Download WinSCP: ongo8.ece.iastate.edu/ongo8/phptraining/winscp.ex e  Start WinSCP  Host name: ongo8.ece.iastate.edu  Ask leader for username and password  Directories -> Remote directory: /var/www/html/ongo8/phptraining  Drag and drop both PHP files to desktop

Development Environment 2/2  Go up a folder to “ongo8” and enter into your group’s directory, then into your personal directory  If you don’t have a personal directory, go to: Commands->Create Directory… and make yourself one  Drag both php files from your desktop into your personal directory  Double click on the file “simple.php”

Syntax  General syntax:  Code is enclosed in tags.  Like C, Java, Perl, etc., each instruction ends with a semicolon  PHP supports C, C++ and shell style comments.  /* multi-line comment */  # shell one line comment  // one line C++ comment  NOTE: one line comments refer to the end of the line (\n character) or end of PHP instruction (;) whichever comes first

Basic PHP  Your first PHP enabled web page!!  Add the following code somewhere:  echo " Hello World ";  Open the web page in your browser: ongo8.ece.iastate.edu/ongo8/group/username/simple.ph p  Now add this:  phpinfo();  Open the web page again

Variables  Four scalar variables: boolean, integer, float, string  Two compounds: array, object  Variables start with a “$”  Use var_dump(); to see type and value of a certain variable. Very useful for debugging!!  Example code: $bool = TRUE; // a boolean $str = "foo"; // a string $int = 12; // an integer var_dump();

Flow Control  If/else/elseif statements are used just like in C if (condition) { // …do this if true..; } else { //do this otherwise }  switch, for, while, etc. statements are just like in C too

Arrays //Declare an empty array $errors = array(); //Add values to the array $errors[] = ‘this goes in index 0’; $errors[] = ‘this goes in index 1’; $errors[‘err15’] = ‘this goes in index err15’; //Print those values echo " index 0: ". $errors[0]. " "; echo "index err15: ". $errors['err15']. " "; //Declare an array with pre-defined entries $teachers = array('John'=>’Lamont’, ‘Pat’=>’Patterson’); //Print the array print_r();

Includes  Includes are similar to C: include 'lib.authentication.php';  Will basically paste the contents of lib.authentication.php wherever the include statement is  Also can use:  include_once  require  require_once

Objects  PHP has very limited support for objects (at least for the version of PHP we’re using)  Can have both constructors and methods  Has no understanding of Public, Private, etc.  Calling the constructor: $userData = new User($fname, $mname, $lname, $notes, $owner, $permission, $username, $password, $passwordh, $permission, $username, $password, $passwordh, $startdate, $stopdate, $studentid, $ ); $startdate, $stopdate, $studentid, $ );  Calling a method: $permission = $userData->getPermission();

Tips and Tricks  Use the php.net documentation, it’s very useful and convenient  Use google  Ask around if you have a question  Don’t use an HTML editor, it messes up PHP code in some people’s experience  Most secure ftp clients let you edit remote files in a local text editor. I use WinSCP.

New Stuff  Authentication (You don’t have to worry about this.)  Quiz timing (Javascript and PHP)

Questions & Comments??