Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Housing and Dining Online by Andrew Gorges. Outline  Overview of PHP  Overview of MySQL  Using PHP  Using MySQL  PHP and MySQL together  Production."— Presentation transcript:

1 Housing and Dining Online by Andrew Gorges

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

3 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

4 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 ”; ?>

5 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

6 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[] Click here to count Click here to count

7 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

8 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) );

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

10 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;

11 MySQL and PHP Together Title Sub Title Author Title Sub Title Author $title $subtitle $author ";?> $title $subtitle $author ";?>

12 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

13 System Architecture MySQL PHP Verisign PayFlowPro Web Browser

14 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);

15 Links   

16 Questions?


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

Similar presentations


Ads by Google