Unit 1 – Web Concepts Instructor: Brent Presley.

Slides:



Advertisements
Similar presentations
FIRST SESSION - XAMPP Jeongmin Lee.  Jeongmin Lee  CS  PHD  Machine Learning, AI  Web System Development.
Advertisements

PHP syntax basics. Personal Home Page This is a Hypertext processor It works on the server side It demands a Web-server to be installed.
© 2010 Delmar, Cengage Learning Chapter 1 Getting Started with Dreamweaver.
Server-Side vs. Client-Side Scripting Languages
1 Chapter 12 Working With Access 2000 on the Internet.
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
Creating WordPress Websites. Creating a site on your computer Local server Local WordPress installation Setting Up Dreamweaver.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Website Development with PHP and MySQL Introduction.
Presented by Mina Haratiannezhadi 1.  publishing, editing and modifying content  maintenance  central interface  manage workflows 2.
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)
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
SYST Web Technologies SYST Web Technologies Installing a Web Server (XAMPP)
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 and MySQL Week#1  Course Plan.  Introduction to Dynamic Web Content.  Setting Up Development Server Eng. Mohamed Ahmed Black 1.
Linux Operations and Administration
17 Web Servers (Apache and IIS)
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Getting Started with Dreamweaver
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
1 Web Server Concepts Dr. Awad Khalil Computer Science Department AUC.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Eclipse Overview Introduction to Web Programming Kirkwood Continuing Education Fred McClurg © Copyright 2015, Fred McClurg, All Rights Reserved.
Web Application Programming Carol Wolf Computer Science.
Unit 1 – Web Concepts Instructor: Brent Presley. ASSIGNMENT Read Chapter 1 Complete lab 1 – Installing Portable Apps.
Class03 Introduction to Web Development with PHP MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University.
Python CGI programming
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
CIS 205—Web Design & Development Dreamweaver Chapter 1.
ASP Introduction Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Website Design Lecture 1. Outline Introduction to the module Outline of the Assessment Schedule Lecture Static XHTML, client side and server side Why.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
1 Session 1: Introduction to PHP & MySQL iNET Academy Open Source Web Development.
Web Architecture Introduction
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.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
WAMP Windows Apache MySQL and PHP i.e. “WAMP”. Why WAMP? WampServer is a Windows web development environment. It allows you to create and test web pages.
 2008 Pearson Education, Inc. All rights reserved. Chapter 17 Web Servers (Apache and IIS) Internet & World Wide Web How to Program, 5/e.
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Class03 Introduction to Web Development (Hierarchy and the IDE) MIS 3501, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 10: Internet Information Services (IIS)
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
XAMPP.
PHP stands for …….. “PHP Hypertext Pre-processor” and is a server-side scripting language like ASP. PHP scripts are executed on the server PHP supports.
Class03 Introduction to Web Development (Hierarchy and the IDE)
Introduction to Dynamic Web Programming
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
Introduction and Principles
Introduction to Web programming
Developing Web-Based Applications
PHP / MySQL Introduction
Unit 4 – Functions and Include Files
Database Driven Websites
PHP and Forms.
Review of Previous Lesson
XAMPP.
Presentation transcript:

Unit 1 – Web Concepts Instructor: Brent Presley

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 3

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 4

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 5

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 6

REVIEW Previously you learned to create dynamic web pages using JavaScript –JavaScript was embedded in the page, or stored in an included file –Once the page loaded, it’s behavior was controlled by JavaScript Though the pages were dynamic, they lacked on critical component: the ability to store data between sessions.. Why is this important?

SERVER-SIDE APPLICATIONS Web server (server-side) applications allow you to dynamically create web pages before they are sent to the client. –Code is used to access data –Code is combined with HTML and data to create web pages

HTTP REQUEST FOR PHP PAGE Client (laptop) still sends an HTTP request, but for a PHP page The web server interprets the PHP commands –Requests data if needed (probably) –Uses query results to create the contents of a web page –Just HTML is returned to the client. If you view the source of the returned page, it contains no PHP. Page created using PHP may also contain JavaScript that can control the appearance of the form on the client

EXAMPLE View source on attendance page View actual source

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 11

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 12

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 13

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 14

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 15  Open source, free web server  Major component of LAMP (Linux, Apache, MySQL, PHP)  Microsoft’s web server software.  Only runs on Windows Server OS Primarily supports ASP

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 16  Open source, Java-like language. Available for both Apache and IIS  Uses.net -like interface to develop pages for IIS : multi-use development language that can be used to develop web pages for Apache Older, less-used open source language used to develop for Apache open source database software available for all servers and most operating systems  for-pay database software from Oracle for-pay database software from IBM Server: for-pay database software from Microsoft

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 17

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 18

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 19

PHP SITE COMPONENTS PHP pages (must have.php extension) HTML pages –Normally, if one page is a site has the php extension, they are all given the php extension –PHP pages are simply HTML pages with PHP embedded in them –They do not have to have PHP in them –The PHP commands will only be interpreted if the extension is php. CSS files JavaScript include files PHP include files Images and other support files

PHP APPLICATIONS PHP files, like HTML, CSS and JavaScript files are pure text. –They can be developed with any text editor, like Notepad or Notepad++ To help debug PHP code, developers often use a PHP development environment –Eclipse is a free, multi-language IDE that is commonly used –IDEs can do on-the-fly syntax checking (to some extent), provide intellisense (popups) features IDEs often include debuggers that allow you step through your code and inspect variables

PHP PAGES –The real challenge is how to simulate the web and database servers. Web development is not done on actual web servers. We will use portable versions of the Apache server and MySQL database server that are available for PortableApps through a program called XAMPP –XAMPP is an abbreviation for (see LAMP above) X – cross-platform A – Apache M – MySQL P – PHP P – Perl

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 23

XAMPP This program allows you to completely simulate a web server on your USB drive and accurately develop complete web data management applications There is a version of XAMPP available for Windows that you can permanently install on your computer. I recommend using the PortableApps version so you can carry your work from home to school.

ASSIGNMENT INSTALL XAMPP See separate notes for Installing and Using XAMPP (slide 2 of this presentation) Note that even though XAMPP is a PortableApps application, it does not install into the PortableApps folder— it installs in the root folder of your USB drive. DO NOT move this folder! In order for the Apache web server (and all its components) to work, the xampp folder must be located in the root.

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 26

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 27

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 28

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 29

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 30

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 31

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 32

LOCATING YOUR PHP APPLICATION In order for the Apache web server to run your PHP applications, they MUST be stored in the xampp\htdocs folder. When you attempt to display a PHP page, you will be designating the page is on the local host. Apache translates this to the htdocs folder. You CAN create subfolders in the htdocs folder and I recommend you do so for each of your PHP projects.

LOCATING YOUR MYSQL DATABASE Remember if you plan to use database commands in your PHP, you must also start MySQL in the XAMPP control panel. Actually, you don’t tell PHP applications or the MySQL Query Browser where to place your databases. The MySQL database server automatically places the databases where it can find them. Should you need to find your database (to back it up or transfer it to another location), you can find them in: xampp\mysql\data folder.

LAUNCHING/VIEWING/TESTING A PHP PAGE –Be sure your PHP file is in the proper folder (see above) –To test your PHP page, first open the browser of your choice. There is no way I know of to launch a page by double-clicking it It’ll launch, but PHP will not be available –In the address bar enter localhost Alternatively, you can use

LAUNCHING/VIEWING/TESTING A PHP PAGE This will launch the index.php page if there is one. Otherwise, will give you a file structure Note, like HTML pages, if the file is named index.php, you do not need to include index.php in the file name, just the folder name –The web server automatically searches for the index file (or default file, php, htm, html extension) if the path ends in a folder name

LAUNCHING/VIEWING/TESTING A PHP PAGE Note: if there is no index.php page in the root folder of localhost, entering localhost will display a directory of folders and files in localhost (htdocs) –Tip: Delete all the files/folders entered into htdocs by XAMPP. –Tip: Enter localhost to get the directory, then simply click the folder name of the project you want to launch. If the folder contains an index.php file it will automatically launch. I have added a Local Host Directory item to the Notepad++ Run menu to give quick access to the localhost directory.

LAUNCH NON INDEX.PHP PAGES Be sure your PHP file is in the proper folder To test your PHP page, first open the browser of your choice. –In the address bar enter localhost/pagename.php Replace pagename with the name of your PHP page. If you want to launch a page that is not in the htdocs folder, simply insert the folder’s path (must be a subfolder of htdocs) between localhost and the PHP file name Localhost/Brent/pagename.php

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 39

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 40

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 41

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 42

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 43

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 44

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 45

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 46

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 47

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 48

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 49

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 50

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 51

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 52

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 53

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 54

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 55

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 56

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 57

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 58

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 59

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 60

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 61 Auto-completion list for names that start with $d Error icon Warning icons

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 62

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 63

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 64

Murach's PHP and MySQL, C1 © 2014, Mike Murach & Associates, Inc. Slide 65