Housing and Dining Online by Andrew Gorges. Outline  Overview of PHP  Overview of MySQL  Using PHP  Using MySQL  PHP and MySQL together  Production.

Slides:



Advertisements
Similar presentations
PHP: Date() Function The PHP date() function formats a timestamp to a more readable date and time.
Advertisements

PHP I.
Other Web Application Development Technologies. PHP.
E-Commerce CMM503 – Lecture 8 Stuart Watt Room C2.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
1 Database Driven Web Application Clients Application Servers including web servers Database Server Traditional client-server (2-tier architecture): client:
PRACTICAL PHP AND MYSQL WALKTHROUGH USING SAMPLE CODES – MAX NG.
BY: ALBERTO CABEZAS 4/19/2010. INTRODUCTION: PHP is considered today as one of the most famous scripting languages. PHP is widely used as a general purpose.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
PHP (2) – Functions, Arrays, Databases, and sessions.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Web Page Behavior IS 373—Web Standards Todd Will.
Ruby on Rails Creating a Rails Application Carol E Wolf CS396X.
E-Commerce The technical side. LAMP Linux Linux Apache Apache MySQL MySQL PHP PHP All Open Source and free packages. Can be installed and run on most.
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
PHP & MySQL Mahak Arora Vivek Bangera. Outline How PHP works Basic scripting in PHP Forms in PHP(GET & POST Variables) SQL basics PHP and MySQL connection.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
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.
CSCI 6962: Server-side Design and Programming
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
INTERNET APPLICATION DEVELOPMENT For More visit:
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
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:
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Technical Review - PHP Jang Jaeseok. Overview Introduction  What is PHP?  History of PHP  What can do with PHP?  Advantages of PHP PHP syntax.
12/3/2012ISC329 Isabelle Bichindaritz1 PHP and MySQL Advanced Features.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
PHP MySQL Introduction. MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Creating PHPs to Insert, Update, and Delete Data CS 320.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
Introduction to PHP Advanced Database System Lab no.1.
What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
GOAL User Interactive Web Interface Update Pages by Club Officers Two Level of Authentication.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi,
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
CSC 405: Web Application Engineering II8.1 Web programming using PHP What have we learnt? What have we learnt? Underlying technologies of database supported.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
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.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
CGS 3066: Web Programming and Design Spring 2016 PHP.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
Web Database Programming Using PHP
Introduction to Dynamic Web Programming
Introduction and Principles
Web Database Programming Using PHP
PHP / MySQL Introduction
PHP Introduction.
ISC440: Web Programming 2 Server-side Scripting PHP 3
IntroductionToPHP Static vs. Dynamic websites
Tutorial 6 PHP & MySQL Li Xu
Introduction to PHP.
Presentation transcript:

Housing and Dining Online by Andrew Gorges

Outline  Overview of PHP  Overview of MySQL  Using PHP  Using MySQL  PHP and MySQL together  Production Application  Role of Verisign

PHP Overview  Easy learning curve  Syntax very similar to C  Large function library  Embedded directly into HTML  Interpreted, no need to compile  Platform Independent  Web Server Independent  Free and Open Source

Simple PHP  PHP code must be surrounded with special tags  Opening tag:  Opening tag:  Write text to the browser with the echo command  To write Hello, World! to the broswer, include the following in hello.php  Hello, World ”; ?>

PHP Form Data  Access to the HTTP POST and GET data is simple in PHP  The global variables $_POST[] and $_GET[] contain the request data <?php if ($_POST["submit"]) if ($_POST["submit"]) echo " You clicked Submit! "; echo " You clicked Submit! "; else if ($_POST["cancel"]) else if ($_POST["cancel"]) echo " You clicked Cancel! "; echo " You clicked Cancel! ";?> </form>

PHP Sessions  Sessions store their identifier in a cookie in the client’s browser  Every page that uses session data must be proceeded by the session_start() function  Session variables are then set and retrieved by accessing the global $_SESSION[] <?php session_start(); session_start(); if (!$_SESSION["count"]) if (!$_SESSION["count"]) $_SESSION["count"] = 0; $_SESSION["count"] = 0; if ($_GET["count"] == "yes") if ($_GET["count"] == "yes") $_SESSION["count"] = $_SESSION["count"] + 1; $_SESSION["count"] = $_SESSION["count"] + 1; echo " ".$_SESSION["count"]." "; echo " ".$_SESSION["count"]." ";?> Click here to count Click here to count

MySQL Overview  Fast, free, stable database  Syntax is similar to Oracle  Many of the same features as Oracle  Production version still missing subqueries, stored procedures, and triggers  Frequently used in conjunction with Linux, Apache, and PHP

Creating a Table  Making a new table is rather easy in MySQL  CREATE TABLE books ( idNumber int primary key auto_increment, title varchar(30), author varchar(30) );

Inserting Data  The insert statement is straightforward  INSERT INTO books (title,author) VALUES( “Let Freedom Ring”, “Sean Hannity” );

Other Operations  ALTER TABLE books ADD COLUMN subtitle varchar(50) AFTER title;  UPDATE books SET subtitle=“Winning the War of Liberty over Liberalism” WHERE idNumber=1;  SELECT * FROM books;  DELETE FROM books;

MySQL and PHP Together <?php include("/var/db.php"); include("/var/db.php"); $dbLink = mysql_connect("localhost", $dbUser, $dbPass); $dbLink = mysql_connect("localhost", $dbUser, $dbPass); $sql = "SELECT * FROM books"; $sql = "SELECT * FROM books"; $res = mysql_db_query("test", $sql, $dbLink); $res = mysql_db_query("test", $sql, $dbLink); $row = mysql_fetch_assoc($res); $row = mysql_fetch_assoc($res); $title = $row["title"]; $title = $row["title"]; $subtitle = $row["subtitle"]; $subtitle = $row["subtitle"]; $author = $row["author"]; $author = $row["author"];?> Title Sub Title Author Title Sub Title Author $title $subtitle $author ";?> $title $subtitle $author ";?></tr></table>

Production Application  Early Room Preference System Online  Heavy use of MySQL database for room maps  Uses Verisign’s PayFlowPro™  All information passes over Secure Socket Layer

System Architecture MySQL PHP Verisign PayFlowPro Web Browser

Role of Verisign  Provide the Secure Server Certificate  Provide PayFlow Pro™ Interface $transaction = array( 'USER' => 'ksuhousing',  'PWD' => ‘*********',  'PARTNER' => 'VeriSign',  'TRXTYPE' => 'S',  'TENDER' => 'C',  'AMT' => 25.00,  'ACCT' => $number,  'EXPDATE' => $expDate, 'COMMENT1' => 'App Payment', 'COMMENT1' => 'App Payment',  'STREET' => stripslashes($address),  'ZIP' => $zip  );  //execute the transaction  $response = pfpro_process($transaction);

Links   

Questions?