Introduction to php Chapter 1 ACSG 550. What we will be doing… Developing full-service websites with – dynamic content – support for user interaction.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Session 1 & 2BBK P1 Module5-May-2007 : [‹#›] PHP: The Basics.
Administrative  Philosophy  Class survey  Grading  Proposal (5 points max)  Small projects (10 points each max)  Project (40 points max)  Presentation.
Multiple Tiers in Action
By Brian Patterson & Amanda Perez. PHP was originally created to maintain his personal homepage, hence the name PHP. Development began in 1994 and was.
Administrative  Philosophy  Class survey  Grading  Project  Presentation.
PHP Scripting Language. Introduction “PHP” is an acronym for “PHP: Hypertext Preprocessor.” It is an interpreted, server-side scripting language. Originally.
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
1 Open Source Programming. -Introduction to PHP -PHP installation /wamp server installation for PHP environment -PHP syntax -PHP variables -PHP Strings.
Web Page A page displayed by the browser. Website Collection of multiple web pages Web Browser: A software that displays web pages on client computer.
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”
CS Learning Centre PHP Tutorial. Introduction ⇨ Based on PHP and MySQL Web Development, Third Edition (Available as CS eBook from Dal Library) ⇨ Other.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Intro to PHP at Winthrop CSCI 297 Scripting Languages Day One.
Web Design Scripting and the Web. Books on Scripting.
CGS3066: Web Programming and Design Summer 2014 Instructor Mir Anamul Hasan.
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.
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, October 18, 2012 Session 7: PHP.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
PHP With Oracle 11g XE By Shyam Gurram Eastern Illinois University.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
CS453: State in Web Applications (Part 1) State in General Sessions (esp. in PHP) Prof. Tom Horton.
Web Design and Development for E-Business By Jensen J. Zhao Copyright 2003 Prentice Hall, Inc. Web Design and Development for E-Business Jensen J. Zhao.
Computing & Information Sciences Kansas State University Lecture 17 of 42 Friday, 10 October 2008 William H. Hsu Department of Computing and Information.
Group ID: Prepared By: Jubin Goswami Milan Valambhiya.
JavaScript – Quiz #9 Lecture Code:
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Mini Group Presentations: php by Veronica Black + Jia Xu.
Web Interfaces, Forms & Databases Databases Snyder p HTML Basics Snyder p JavaScript Snyder Chapter 18.
ISYS 475 Project: Customizing a Zen Cart E-Commerce Site.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
PHP - Basic Language Constructs CSCI 297 Scripting Languages - Day Two.
CS 494 Web Development Class Size: Winter, 214: 97 Spring, 214: 81 Summer, 2014: 69.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
1 PHP Introduction Chapter 1. Syntax and language constructs.
COOKIES and SESSIONS. COOKIES A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each.
Case Study Dynamic Website - Three Tier Architecture
1 PHP Introduction Chapter 1. Syntax and language constructs.
Storing and Retrieving Data
Web Design: Basic to Advanced Techniques Fall 2010 Mondays 7-9pm 200 Sutardja-Dai Hall Introduction to PHP.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
The basics of knowing the difference CLIENT VS. SERVER.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
 A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests.
 To start using PHP, you can:  Find a web host with PHP and MySQL support  Install a web server on your own PC, and then install PHP and MySQL.
Chapter 1 Introduction to PHP Part 1. Textbook’s Code DOWNLOADS PHP and MySQL for Dynamic Web Sites Complete Set of Scripts.
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.
Web Application Development 1 Course Introduction.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
Advanced Website Design Professor: Jared Kozel Class Description: Are you already familiar with how to construct a basic Website? This class will teach.
Basics Components of Web Design & Development Basics, Components, Design and Development.
Class02 Introduction to web development concepts MIS 3501, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 1/14/2016.
CX Introduction to Web Programming Introduction & Overview Prepared by: KAR First Prepared on: Last Modified on: xx-xx-xx Quality checked.
PHP Assignment Help BookMyEssay. What is PHP PHP is a scripting language generally used on web servers. It is an open source language and embedded code.
PHP using MySQL Database for Web Development (part II)
Web Systems & Technologies
Introduction to Dynamic Web Programming
Introduction to web development concepts
Introduction to PHP Part 1
Web Development Training
PHP Overview PHP: Hypertext Preprocessor Server-Side Scripting
Database Driven Websites
Web Systems & Technologies
Web Application Development CSC318.
Hypertext Preprocessor
Introduction to JavaScript
Web Application Development Using PHP
Presentation transcript:

Introduction to php Chapter 1 ACSG 550

What we will be doing… Developing full-service websites with – dynamic content – support for user interaction – client and server-side processing – underlying databases We are using php and mysql

php A scripting language that supports server-side processing It’s a full language in its own right – Variables – Control structures – Objects We embed it into our html pages – Dynamic content – Form processing – Database processing

Where is php? On our web servers – csmaster – cs1 You can also download it from and configure it for use on your own computer In class for now, we’ll use csmaster

Example files freight.html freight.php orderform.html processorder.php

html forms Item Quantity Tires Oil Spark Plugs How did you find Bob's? I'm a regular customer TV advertising Phone directory Word of mouth orderform.html

processororder.php – Part 1 <?php // create short variable names $tireqty = $_POST['tireqty']; $oilqty = $_POST['oilqty']; $sparkqty = $_POST['sparkqty']; $find = $_POST['find']; ?>

processororder.php – Part 2 Bob's Auto Parts - Order Results Bob's Auto Parts Order Results

processororder.php – Part 3 <?php echo ' Order processed at '; echo date('H:i, jS F'); echo ' '; echo ' Your order is as follows: '; $totalqty = 0; $totalqty = $tireqty + $oilqty + $sparkqty; echo 'Items ordered: '.$totalqty.' '; if( $totalqty == 0) { echo 'You did not order anything on the previous page! '; } else { if ( $tireqty>0 ) echo $tireqty.' tires '; if ( $oilqty>0 ) echo $oilqty.' bottles of oil '; if ( $sparkqty>0 ) echo $sparkqty.' spark plugs '; }

processororder.php – Part 4 $totalamount = 0.00; define('TIREPRICE', 100); define('OILPRICE', 10); define('SPARKPRICE', 4); $totalamount = $tireqty * TIREPRICE + $oilqty * OILPRICE + $sparkqty * SPARKPRICE; echo 'Subtotal: $'.number_format($totalamount,2).' '; $taxrate = 0.10; // local sales tax is 10% $totalamount = $totalamount * (1 + $taxrate); echo 'Total including tax: $'.number_format($totalamount,2).' '; if($find == 'a') echo ' Regular customer. '; elseif($find == 'b') echo ' Customer referred by TV advert. '; elseif($find == 'c') echo ' Customer referred by phone directory. '; elseif($find == 'd') echo ' Customer referred by word of mouth. '; else echo ' We do not know how this customer found us. '; ?>

freight.php Distance Cost <? $distance = 50; while ($distance <= 250 ) { echo " \n $distance \n"; echo " ". $distance / 5 " \n \n"; $distance += 50; } ?>

Assignment Lab 1 hand-out HW – read Chapter 1 Next week’s class is online – Check that you can access Blackboard – Assignments will be available in Blackboard starting Friday The topic of these assignments is the fundamentals of php, as introduced in Chapter 1