Intro to PHP Carl-Erik Svensson. What is PHP? PHP is a widely-used general-purpose scripting language that is especially suited for Web development and.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

PHP and MySQL Database. Connecting to MySQL Note: you need to make sure that you have MySQL software properly installed on your computer before you attempt.
PHP (2) – Functions, Arrays, Databases, and sessions.
PHP CSCE 330 February 6, 2003 Group Members: Antwan B. Phan George Hwang Luat Vu Programming Language Presentation.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic PHP.
Learning Web development. 3(+1) Tier architecture PHP script Remote services Web Server (Apache, IIS) Browser (IE, FireFox, Opera) Desktop (PC or MAC)
Introduction to PHP. PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP.
Website Development & Management PHP Odds & Ends Instructor: John Seydel, Ph.D. CIT Fall
Guide To UNIX Using Linux Third Edition
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
The PHP Story. PHP Story PHP is a programming language. Incorporate(join) sophisticated business logic. Widely used general purpose scripting language.
PHP: Hypertext Processor Fred Durao
SJSU CS157B Dr. Lee1  2004 Jenny Mitchell Two Useful Tools You Can’t Live Without by Jenny Mitchell SJSU CS157B Section PHP and MySQL.
Cascade Server for Developers Vince Ruppert College of Liberal Arts BoilerWeb 2011.
PHP - Hypertext Preprocessor Yaron Benita De Paul University.
Programming with php By: Seth Larson. A little bit about PHP  PHP stands for PHP:  Hypertext Preprocessor  PHP is a widely-used general-purpose server-side.
Application Development Description and exemplification of server-side scripting language for server connection, database selection, execution of SQL queries.
Basic php. Php Official site: PhP manual: Useful package (Apache, MySql,PhP):
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.
PHP H ypertext P re-processor. Unit 6 - PHP - Hello World! - Data types - Control structures - Operators.
MySQL in PHP – Page 1 of 17CSCI 2910 – Client/Server-Side Programming CSCI 2910 Client/Server-Side Programming Topic: MySQL in PHP Reading: Williams &
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
INTERNET APPLICATION DEVELOPMENT For More visit:
MySQL + PHP.  Introduction Before you actually start building your database scripts, you must have a database to place information into and read it from.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
PHP TUTORIAL. HISTORY OF PHP  PHP as it's known today is actually the successor to a product named PHP/FI.  Created in 1994 by Rasmus Lerdorf, the very.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Nael Alian Introduction to PHP
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
Class02 Introduction to web development with PHP MIS 3501, Fall 2015 Brad N Greenwood Department of MIS Fox School of Business Temple University 8/27/2015.
PHP and MySQL by Example COMP YL Professor Mattos.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Lecture 10 – MYSQL and PHP (Part 2)
PHP By Sergio Rodriguez By Sergio Rodriguez. PHP G PHP: Hypertext Preprocessor G Scripting language G PHP: Hypertext Preprocessor G Scripting language.
9 1 DBM Databases CGI/Perl Programming By Diane Zak.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Web-Based Database Programming with PHP. Dept. of Computing Science, University of Aberdeen2 In this lecture you will learn PHP Basics PHP functions –To.
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
PHP and mySQL 2/9/2007. What is PHP?  From php.net “PHP is a widely-used general- purpose scripting language that is especially suited for Web development.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP & MySQL.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
PHP Database Processing CIS 1715 Web Technologies.
Introducing the World Wide Web Internet- a structure made up of millions of interconnected computers whose users communicate with each other and share.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
Forms Overview, Query string, Submitting arrays, PHP & HTML, Input types, Redirecting the user Mario Peshev Technical Trainer Software.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
PHP, Databases, and Cookies Dave Pease IDS496 12/2/2003
MySQL MySQL and PHP – interacting with a database.
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.
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,
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
HTML Help book. HTML HTML is the programming language used to make web pages for the Internet. HTML stands for Hyper Text Markup Language. HTML is made.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
PHP / MySQL Introduction
BASIC PHP and MYSQL Edward S. Flores.
Server-Side Processing II
Web Application Development Using PHP
Presentation transcript:

Intro to PHP Carl-Erik Svensson

What is PHP? PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML* *Source:

Why Use PHP? Simple, yet powerful scripting tool Easily format and display database information It is popular Image Source:

The Basics

The Results Output from a script goes directly into the HTML that is parsed This is what is meant by a ‘dynamic’ webpage

Some Syntax Generally C-like Variables are not strongly typed

Web Applications Form processing Database manipulation –Blogs –Forums –Facebook

PHP + MySQL = Sweet MySQL is an open source database software solution Enables rich web applications when combined with PHP Image Source:

Rainfall Application Read the contents of a database Get the rainfall data Parse the results Display it

Connecting to a Database PHP Has a set of functions that can be used with MySQL First step is to setup a link to the desired database

Making a Query Once a link is established, querying is easy Errors for any given function are returned by mysql_error()

MySQL Result Set The value returned by mysql_query() is a reference to an internal data structure It can be parsed by various functions

Associative Arrays An array that can be indexed by a string A set of key->value pairs Very similar to a hash in Perl

PHP foreach Similar to the Perl equivalent Allows iterating through each element of an array

Put it All Together

The Results

A Slight Improvement This was not the exact code we came up with I added some titles and a neat trick –Highlight every other row in the table –This makes information more readable

Samples USGS Example Rainfall EC Awards Committee Scholarship DatabaseEC Awards Committee Scholarship Database

What Else Can PHP Do? Command line scripting Desktop applications Anything

Links PHP.net PHP Manual MySQL w3schools.com