USQ/CSC2406 Web Publishing

Size: px
Start display at page:

Download "USQ/CSC2406 Web Publishing"

Transcription

1 USQ/CSC2406 Web Publishing Lecture 4: HTML Forms, Server & CGI Scripts Tralvex (Rex) Yeap 19 December 2002

2 Outline Quick Review on Lecture 3 Topic 7: HTML Forms Topic 8: Server & CGI Scripts Class Activity 1: Assignment 2 Discussion Additional Handouts for L4 What s in Store for Lecture 5

3 Quick Review of Lecture 3 Video on Apache Download, Setup & Testing Topic 5: HTTP Class Activity 1: Real World Javascripts & Presentation Topic 6a: HTTP Topic 6b: MIME

4 Topic 7: HTML Forms Introduction An HTML form is a section of a document containing normal content, markup, special elements called controls and labels. Available controls: Text - Image - Password Reset - Checkbox - File Radio - Submit - Hidden Users generally "complete" a form by modifying its controls (entering text, selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to a Web server, to a mail server, etc.)

5 Topic 7: HTML Forms Process: HTML Forms Submission

6 Topic 7: HTML Forms Let the journey begins 11 <FORM <FORM ACTION= ACTION= METHOD=POST> METHOD=POST> <INPUT <INPUT TYPE="text" TYPE="text" NAME="text_field"> NAME="text_field"> <BR> <BR> <INPUT <INPUT TYPE="Submit" TYPE="Submit" VALUE="Submit"> VALUE="Submit"> </FORM> </FORM> FORM tags tells the browser, where it ends and begins. ACTION tag tells the browse where to send the information to. METHOD is either POST or GET. POST is when doing an ACTION that is "permanent", e.g. sending . GET is when doing something that does not change the state of the world or anything else, e.g. doing a search on a database. Lastly, fields where people enter data and submit it / clear it.

7 Topic 7: HTML Forms Options in Controls 22

8 Topic 7: HTML Forms Options in Controls (cont) 33

9 Topic 7: HTML Forms GET and POST in perspective GET and POST allow form submissions to the server. GET To get a file or other resource, possibly with parameters. Data in GET is appended to the URL, eg. Browsers uses GET to download files, like HTML files and images. Limited data in form submissions (the limit varies from browser to browser). CGI program will receive the encoded form input in the environment variable QUERY_STRING Advantage: Allows GET to be embedded in the form of URL, instead of a HTML FORM. POST To send a chunk of data to the server to be processed When an HTML form is submitted using POST, your form data is attached to the end of the POST request, in its own object (specifically, in the message body). More complex than GET, but is more versatile. For example, you can send files using POST. No data size limitation. CGI program will receive the encoded form input on stdin. Use CONTENT_LENGTH to determine the length of the data Advantage: Clean codes in browser url after submission.

10 Topic 7: HTML Forms Guestbook: How does it works? (off-line assignment)

11 Topic 7: HTML Forms Reference:

12 Topic 8: CGI Scripts Introduction The Common Gateway Interface (CGI) is a standard for interfacing external applications with information servers, such as HTTP or Web servers. CGI program is executable. A plain HTML document that the Web software retrieves is static. A CGI program is executed in real-time, so that it can output dynamic information. Most common method of interfacing with a CGI script on the clientend (Web Browser) is through HTML Forms. The common gateway interface provides a consistent way to exchange data between the user (client-end) and the application program (server-end): Operating system independent: PC, Macintosh, UNIX, OS/390, or others Programming Language independent: C/C++, Fortran, PERL, TCL, Any Unix shell, Visual Basic, AppleScript

13 Topic 8: CGI Scripts Illustration: CGI Execution User Input CGI Program (resides on Web server) CGI Output Web Publishing Subject Web site Date counter

14 Topic 8: CGI Scripts Hello World CGI Script /*************************************************************************/ /*************************************************************************/ /** /** **/ **/ /** /** hello.c-- hello.c-- simple simple "hello, "hello, world", world", to to demonstrate demonstrate basic basic CGI CGI **/ **/ /** /** **/ **/ /*************************************************************************/ /*************************************************************************/ #include #include <stdio.h> <stdio.h> void void main() main() { /** /** Print Print the the CGI CGI response response header, header, required required for for all all HTML HTML output. output. **/ **/ /** /** Note Note the the extra extra \n, \n, to to send send the the blank blank line. line. **/ **/ printf("content-type: printf("content-type: text/html\n\n") text/html\n\n") /** /** Print Print the the HTML HTML response response page page to to STDOUT. STDOUT. **/ **/ printf("<html>\n") printf("<html>\n") printf("<head><title>cgi printf("<head><title>cgi Output</title></head>\n") Output</title></head>\n") printf("<body>\n") printf("<body>\n") printf("<h1>hello, printf("<h1>hello, world.</h1>\n") world.</h1>\n") printf("</body>\n") printf("</body>\n") printf("</html>\n") printf("</html>\n") } exit(0) exit(0)

15 Topic 8: CGI Scripts Hello World, with echo inputs CGI Script Full source code in C with /** /** Standard Standard "hello, "hello, world" world" program, program, that that also also shows shows all all CGI CGI input. input. **/ **/ int int main() main() { { char char **cgivars **cgivars int int i i /** /** First, First, get get the the CGI CGI variables variables into into a a list list of of strings strings **/ cgivars= **/ cgivars= getcgivars() getcgivars() /** /** Print Print the the CGI CGI response response header, header, required required for for all all HTML HTML output.**/ output.**/ /** /** Note Note the the extra extra \n, \n, to to send send the the blank blank line. line. **/ printf("content-type: **/ printf("content-type: text/html\n\n") text/html\n\n") /** /** Finally, Finally, print print out out the the complete complete HTML HTML response response page. page. **/ printf("<html>\n") **/ printf("<html>\n") printf("<head><title>cgi printf("<head><title>cgi Results</title></head>\n") Results</title></head>\n") printf("<body>\n") printf("<body>\n") printf("<h1>hello, printf("<h1>hello, world.</h1>\n") world.</h1>\n") printf("your printf("your CGI CGI input input variables variables were:\n") were:\n") printf("<ul>\n") printf("<ul>\n") /** /** Print Print the the CGI CGI variables variables sent sent by by the the user. user. Note Note the the list list of of **/ **/ /** /** variables variables alternates alternates names names and and values, values, and and ends ends in in NULL. NULL. **/ for **/ for (i=0 (i=0 cgivars[i] cgivars[i] i+= i+= 2) 2) printf("<li>[%s] printf("<li>[%s] = = [%s]\n", [%s]\n", cgivars[i], cgivars[i], cgivars[i+1]) cgivars[i+1]) printf("</ul>\n") printf("</ul>\n") printf("</body>\n") printf("</body>\n") printf("</html>\n") printf("</html>\n") /** /** Free Free anything anything that that needs needs to to be be freed freed **/ **/ for for (i=0 (i=0 cgivars[i] cgivars[i] i++) i++) free(cgivars[i]) free(cgivars[i]) free(cgivars) free(cgivars) exit(0) exit(0) } }

16 Topic 8: CGI Scripts CGI Environment Variables Perl extracts while (($key, $val) = each %ENV) { print "$key $val" }

17 Topic 8: CGI Scripts Cookie Monster A powerful and versatile way of retaining state information is with cookies. Cookies are name=value pairs very much like the names parameters in the CGI query string. Unlike the query string, however, cookies are sent back and forth in the HTTP header rather than within the HTML URLs or forms. Cookies have a number of important advantages over other methods for storing state information. Cookies are maintained by the browser, minimizing the work of the script or server. They can be associated with the entire site or a particular URL path. This allows a site to maintain a series of interacting scripts that share or pass state information to each other via cookies. Cookies can be assigned an expiration date. By default a cookie s lifetime is limited to the current session, but cookies can be created that will persist for days or longer.

18 Topic 8: CGI Scripts Cookie Monster (cont) Cookies are set and retrieved through a HTTP header. To create them, add one or more Set-cookie: fields to the header lines. The syntax for the Set-cookie: header is (without the line break): Set-cookie: CookieNAME=CookieVALUE EXPIRES=datePATH=path DOMAIN=domain_name SECURE Example: The following code sets a cookie with the name poet and the value Samual+Taylor+Coleridge Set-cookie: poet=samual+taylor+coleridge Cookie.c - cookie extraction functions for CGI programs

19 Topic 8: CGI Scripts Enable CGI in Apache Server Edit srm.conf From: #ScriptAlias /cgi-bin/ To : ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin From: #AddHandler cgi-script.cgi To : AddHandler cgi-script.cgi Edit access.conf AllowOverride None Options None </Directory> Restart the server

20 Topic 8: CGI Scripts Routines in cgilib (provided by USQ) Routine to output the HTTP headers void HTTP_header() Routine to output the HTML header information void HTML_header(char *title) Routine to output All the Environment variables void Get_env(char *env[]) Routine to output any command line arguments void Get_com(int argc, char *argv[]) Routine to output anything on STDIN void Get_input() Routine to output the final HTML information to finish of the page void HTML_footer()

21 Topic 8: CGI Scripts Collection of CGI Scripts in C and C++

22 Topic 8: CGI Scripts Plentiful of practical CGI scripts

23 Topic 8: CGI Scripts Programming CGI in C reference websites How CGI Script works (using C language) Getting Started with CGI Programming in C CGI Programming for C Programmers Programming CGI in C/C++

24 Topic 8: CGI Scripts Tutorials on C Programming How C Programming Works C Programming (Strathclyde) C Language Page The C Library Reference Guide UNIX System Calls and Subroutines using C Introduction to C Programming C Programming Notes C Programming Language FAQ C Tutorial (videos)

25 Topic 8: CGI Scripts Reference:

26 Class Activity 1: Assignment 2 Discussion 11 In the catalogue directory create a Forms page that displays the company's product catalogue. Each item that can be purchased has to be selectable. After the customer has selected the items he or she wishes to purchase there should be a submit button on the page so that the customer's selections can be sent to the server. Write a CGI script (to run in the catalogue directory) to do the following Accept the input from the Catalogue form. Write a HTML page to display the user's selections. Have the total cost of the purchases at the bottom of the page. On this page there should also be placed a link to the Ordering page in the order directory. This will take the user straight to the ordering page. This must be a well structured HTML page. Save the state information of the script by writing the order to a cookie to be stored on the client machine. The cookie should be a site wide session cookie. Only one cookie should be sent and it should contain the entire order. The cookie should be returned by the CGI script with the total cost page. Group A & B

27 Class Activity 1: Assignment 2 Discussion (cont) 22 In the order directory create two sub-directories called shipment This directory will contain individual files with each clients order. payment This directory will contain individual files with each clients payment details.

28 Class Activity 1: Assignment 2 Discussion (cont) 33 In the order directory place an ordering CGI script that will perform the following tasks. The same script should perform All the following tasks: Without input the script should dynamically create a well structured HTML page that will display the contents of the total cost cookie That is the client's order. (You can reuse parts of the code from Task 1). If the cookie does not exist or is empty send an error message to the effect that items must be selected before ordering. At the bottom of the page place a link back to this script requesting the user's shipping address. Pass a parameter to the script (in the link URL) so that the script knows that the shipping address form is required. Modify the script so that with the appropriate input (the parameter used above) it will dynamically create a Shipping Address request page. An example of a request for shipping information is the following When the submit button is pressed the script should return a feel good message to the effect that the order is being processed - more importantly it should create two files. 1. A file should be created in the shipment directory containing the clients order. At the same time - 2. A file should be created in the payment directory containing the clients payment details. Group C, D & E

29 Class Activity 1: Assignment 2 Discussion (cont) 44 A diagram of the functionality the two scripts could look something like this

30 Class Activity 1: Assignment 2 Discussion (cont) 55 The directories shipment and payment need to be protected from access by unauthorised people. To this end configure your server so that only users in the shipment group have access to the shipment directory, and only users in the payment group have access to the payment directory. Create a password file called password and group file called group, containing the following - Username Password Group bsmith bessie payment bguy blue shipment jtull ian The password and group files must be placed in the order directory. These files must be protected by configuring the server so that none can download them! 66 Create your own 404 Document not Found page. Configure your server, using the site directory access file, to display your 404 page when there is a request for a non-existant document. 77 In the help directory document this assignment and include links to the source of ALL your CGI scripts, configuration files etc.

31 Class Activity 1: Assignment 2 Discussion Points to note CGI scripts are to be written in C. No other language will be accepted. The reason for this is that we can only support one language and most students have had experience with C. The libcgi library in C is supplied to simplify the task of writing scripts. When writing the client's order file and payment file remember these files must be written into the directories order/shipment and order/payment The script needs to know where these directories are without having the path hardwired into the script. One way to do it is to extract the path information from the CGI environment variable SCRIPT_FILENAME. The order script should reside in the directory order When creating the shipment-file and the payment-file, both files should have the same name (in different directories) and the name should be unique. A simple way to create a unique filename is to use the process identification number of the running script. For example: #include <unistd.h> char filename[6] sprintf(filename,"%d",(int)getpid()) Please note that for a busy commercial site this is NOT the best way of constructing a unique filename - the process id can recycle easily within a day. This assignment must work on a Linux machine. All URLs must be relative. All CGI scripts must be handed in as executables and as source. CGI script executables should have filenames ending in.cgi so that they can run in any directory. The directory configuration file should only appear in the shipment and the payment directories. Do Not use global configuration directives as the directives will Not be submitted with the assignment. Please note that on a commercial site a password file would NEVER be placed in the document tree.

32 Additional Handouts for Lecture 4 n.a.

33 What s in Store for Lecture 5 Topic 9: Server Configuration Topic 10: Server Security Additional Class Activities / Discussion

34 End of Lecture 4 Good Night.

35 Course Outline: Strategies for Local Lectures Lecture 1/6 Getting to know each other (to optimize communications) Topic 1: Introduction Topic 2: HTML / Advanced HTML Additional Topic: Additional Class Activities / Discussion Lecture 2/6 Topic 3: Document and Site Design and Style Guidelines Topic 4: Graphics & Image Maps Discussion on Assignment 1 Additional Class Activities / Discussion

36 Course Outline: Strategies for Local Lectures (cont.) Lecture 3/6 Topic 7: HTML Forms Topic 6: HTTP and MIME Additional Class Activities / Discussion Lecture 4/6 Topic 7: HTML Forms Topic 8: CGI Scripts Discussion on Assignment 2 Additional Class Activities / Discussion

37 Course Outline: Strategies for Local Lectures (cont.) Lecture 5/6 Topic 9: Server Configuration Topic 10: Server Security Additional Class Activities / Discussion Lecture 6/6 Topic 11: Future of Web Publishing Exam Preparations Additional Class Activities / Discussion

NETB 329 Lecture 13 Python CGI Programming

NETB 329 Lecture 13 Python CGI Programming NETB 329 Lecture 13 Python CGI Programming 1 of 83 What is CGI? The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom

More information

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms Web-Based Information Systems Fall 2004 CMPUT 410: CGI and HTML Forms Dr. Osmar R. Zaïane University of Alberta Outline of Lecture 5 Introduction Poor Man s Animation Animation with Java Animation with

More information

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014 CS105 Perl: Perl CGI Nathan Clement 24 Feb 2014 Agenda We will cover some CGI basics, including Perl-specific CGI What is CGI? Server Architecture GET vs POST Preserving State in CGI URL Rewriting, Hidden

More information

PYTHON CGI PROGRAMMING

PYTHON CGI PROGRAMMING PYTHON CGI PROGRAMMING http://www.tutorialspoint.com/python/python_cgi_programming.htm Copyright tutorialspoint.com The Common Gateway Interface, or CGI, is a set of standards that define how information

More information

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University 1 Objectives You will learn about Server-side web programming in Python Common Gateway Interface

More information

Forms, CGI. Objectives

Forms, CGI. Objectives Forms, CGI Objectives The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms Common Gateway Interface (CGI) Later: Servlets Generation

More information

CGI Programming. What is "CGI"?

CGI Programming. What is CGI? CGI Programming What is "CGI"? Common Gateway Interface A means of running an executable program via the Web. CGI is not a Perl-specific concept. Almost any language can produce CGI programs even C++ (gasp!!)

More information

CGI Architecture Diagram. Web browser takes response from web server and displays either the received file or error message.

CGI Architecture Diagram. Web browser takes response from web server and displays either the received file or error message. What is CGI? The Common Gateway Interface (CGI) is a set of standards that define how information is exchanged between the web server and a custom script. is a standard for external gateway programs to

More information

Forms, CGI. HTML forms. Form example. Form example...

Forms, CGI. HTML forms. Form example. Form example... Objectives HTML forms The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms CGI the Common Gateway Interface Later: Servlets Generation

More information

Dynamic Documents. Kent State University Dept. of Math & Computer Science. CS 4/55231 Internet Engineering. What is a Script?

Dynamic Documents. Kent State University Dept. of Math & Computer Science. CS 4/55231 Internet Engineering. What is a Script? CS 4/55231 Internet Engineering Kent State University Dept. of Math & Computer Science LECT-12 Dynamic Documents 1 2 Why Dynamic Documents are needed? There are many situations when customization of the

More information

HTTP. EC512 Spring /15/2015 EC512 - Prof. Thomas Skinner 1

HTTP. EC512 Spring /15/2015 EC512 - Prof. Thomas Skinner 1 HTTP EC512 Spring 2015 2/15/2015 EC512 - Prof. Thomas Skinner 1 HTTP HTTP is the standard protocol used between a web browser and a web server. It is standardized by the World Wide Web Consortium, W3C

More information

Forms, CGI. Cristian Bogdan 2D2052 / 2D1335 F5 1

Forms, CGI. Cristian Bogdan 2D2052 / 2D1335 F5 1 Forms, CGI Cristian Bogdan 2D2052 / 2D1335 F5 1 Objectives The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms Common Gateway Interface

More information

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. Web Programming Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. 1 World-Wide Wide Web (Tim Berners-Lee & Cailliau 92)

More information

Outline. Lecture 8: CGI (Common Gateway Interface ) Common Gateway Interface (CGI) CGI Overview

Outline. Lecture 8: CGI (Common Gateway Interface ) Common Gateway Interface (CGI) CGI Overview Outline Lecture 8: CGI (Common Gateway Interface ) CGI Overview Between Client and Handler Between Web Server and Handler Wendy Liu CSC309F Fall 2007 1 2 Common Gateway Interface (CGI) CGI Overview http://www.oreilly.com/openbook/cgi/

More information

Hands-On Perl Scripting and CGI Programming

Hands-On Perl Scripting and CGI Programming Hands-On Course Description This hands on Perl programming course provides a thorough introduction to the Perl programming language, teaching attendees how to develop and maintain portable scripts useful

More information

You can also set the expiration time of the cookie in another way. It may be easier than using seconds.

You can also set the expiration time of the cookie in another way. It may be easier than using seconds. What is a Cookie? 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 a page with a browser, it will

More information

What is PHP? [1] Figure 1 [1]

What is PHP? [1] Figure 1 [1] PHP What is PHP? [1] PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use Figure

More information

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel. Adobe Dreamweaver CS6 Project 3 guide How to create forms You can use forms to interact with or gather information from site visitors. With forms, visitors can provide feedback, sign a guest book, take

More information

Simple But Useful Tools for Interactive WWW Development

Simple But Useful Tools for Interactive WWW Development Simple But Useful Tools for Interactive WWW Development Robert C. Maher Department of Electrical Engineering University of Nebraska-Lincoln Lincoln, NE 68588-0511 rmaher@unl.edu Abstract An important area

More information

CSC309: Introduction to Web Programming. Lecture 8

CSC309: Introduction to Web Programming. Lecture 8 CSC309: Introduction to Web Programming Lecture 8 Wael Aboulsaadat Front Layer Web Browser HTTP Request Get http://abc.ca/index.html Web (HTTP) Server HTTP Response .. How

More information

Web technologies. Web. basic components. embellishments in browser. DOM (document object model)

Web technologies. Web. basic components. embellishments in browser. DOM (document object model) Web technologies DOM (document object model) what's on the page and how it can be manipulated forms / CGI (common gateway interface) extract info from a form, create a page, send it back server side code

More information

CHAPTER 2. Troubleshooting CGI Scripts

CHAPTER 2. Troubleshooting CGI Scripts CHAPTER 2 Troubleshooting CGI Scripts OVERVIEW Web servers and their CGI environment can be set up in a variety of ways. Chapter 1 covered the basics of the installation and configuration of scripts. However,

More information

Common Gateway Interface CGI

Common Gateway Interface CGI Common Gateway Interface CGI Copyright (c) 2013-2015 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2

More information

Pemrograman Jaringan Web Client Access PTIIK

Pemrograman Jaringan Web Client Access PTIIK Pemrograman Jaringan Web Client Access PTIIK - 2012 In This Chapter You'll learn how to : Download web pages Authenticate to a remote HTTP server Submit form data Handle errors Communicate with protocols

More information

Web Focused Programming With PHP

Web Focused Programming With PHP Web Focused Programming With PHP May 20 2014 Thomas Beebe Advanced DataTools Corp (tom@advancedatatools.com) Tom Beebe Tom is a Senior Database Consultant and has been with Advanced DataTools for over

More information

COSC 2206 Internet Tools. The HTTP Protocol

COSC 2206 Internet Tools. The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol http://www.w3.org/protocols/ What is TCP/IP? TCP: Transmission Control Protocol IP: Internet Protocol These network protocols provide a standard method for sending

More information

User authentication, passwords

User authentication, passwords User authentication, passwords User Authentication Nowadays most internet applications are available only for registered (paying) users How do we restrict access to our website only to privileged users?

More information

Web forms and CGI scripts

Web forms and CGI scripts Web forms and CGI scripts Dr. Andrew C.R. Martin andrew.martin@ucl.ac.uk http://www.bioinf.org.uk/ Aims and objectives Understand how the web works Be able to create forms on HTML pages Understand how

More information

Java Applets, etc. Instructor: Dmitri A. Gusev. Fall Lecture 25, December 5, CS 502: Computers and Communications Technology

Java Applets, etc. Instructor: Dmitri A. Gusev. Fall Lecture 25, December 5, CS 502: Computers and Communications Technology Java Applets, etc. Instructor: Dmitri A. Gusev Fall 2007 CS 502: Computers and Communications Technology Lecture 25, December 5, 2007 CGI (Common Gateway Interface) CGI is a standard for handling forms'

More information

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt Excerpts of Web Application Security focusing on Data Validation adapted for F.I.S.T. 2004, Frankfurt by fs Purpose of this course: 1. Relate to WA s and get a basic understanding of them 2. Understand

More information

Lecture 9a: Sessions and Cookies

Lecture 9a: Sessions and Cookies CS 655 / 441 Fall 2007 Lecture 9a: Sessions and Cookies 1 Review: Structure of a Web Application On every interchange between client and server, server must: Parse request. Look up session state and global

More information

Developing Ajax Applications using EWD and Python. Tutorial: Part 2

Developing Ajax Applications using EWD and Python. Tutorial: Part 2 Developing Ajax Applications using EWD and Python Tutorial: Part 2 Chapter 1: A Logon Form Introduction This second part of our tutorial on developing Ajax applications using EWD and Python will carry

More information

IBM LOT-985. Developing IBM Lotus Notes and Domino(R) 8.5 Applications.

IBM LOT-985. Developing IBM Lotus Notes and Domino(R) 8.5 Applications. IBM LOT-985 Developing IBM Lotus Notes and Domino(R) 8.5 Applications http://killexams.com/exam-detail/lot-985 QUESTION: 182 Robert is adding an editable field called CountryLocation to the Member form

More information

Hostopia WebMail Help

Hostopia WebMail Help Hostopia WebMail Help Table of Contents GETTING STARTED WITH WEBMAIL...5 Version History...6 Introduction to WebMail...6 Cookies and WebMail...6 Logging in to your account...6 Connection time limit...7

More information

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data"

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data CS 418/518 Web Programming Spring 2014 HTML Tables and Forms Dr. Michele Weigle http://www.cs.odu.edu/~mweigle/cs418-s14/ Outline! Assigned Reading! Chapter 4 "Using Tables to Display Data"! Chapter 5

More information

Writing Perl Programs using Control Structures Worked Examples

Writing Perl Programs using Control Structures Worked Examples Writing Perl Programs using Control Structures Worked Examples Louise Dennis October 27, 2004 These notes describe my attempts to do some Perl programming exercises using control structures and HTML Forms.

More information

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017)

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017) UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall 2017 Programming Assignment 1 (updated 9/16/2017) Introduction The purpose of this programming assignment is to give you

More information

Q1. What is JavaScript?

Q1. What is JavaScript? Q1. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded

More information

Creating a Shell or Command Interperter Program CSCI411 Lab

Creating a Shell or Command Interperter Program CSCI411 Lab Creating a Shell or Command Interperter Program CSCI411 Lab Adapted from Linux Kernel Projects by Gary Nutt and Operating Systems by Tannenbaum Exercise Goal: You will learn how to write a LINUX shell

More information

EL2310 Scientific Programming

EL2310 Scientific Programming Lecture 6: Introduction to C (pronobis@kth.se) Overview Overview Lecture 6: Introduction to C Roots of C Getting started with C Closer look at Hello World Programming Environment Schedule Last time (and

More information

Hyperlinks, Tables, Forms and Frameworks

Hyperlinks, Tables, Forms and Frameworks Hyperlinks, Tables, Forms and Frameworks Web Authoring and Design Benjamin Kenwright Outline Review Previous Material HTML Tables, Forms and Frameworks Summary Review/Discussion Email? Did everyone get

More information

Master Syndication Gateway V2. User's Manual. Copyright Bontrager Connection LLC

Master Syndication Gateway V2. User's Manual. Copyright Bontrager Connection LLC Master Syndication Gateway V2 User's Manual Copyright 2005-2006 Bontrager Connection LLC 1 Introduction This document is formatted for A4 printer paper. A version formatted for letter size printer paper

More information

INTRODUCTION TO CGI PROGRAMMING By Jumail Bin Taliba, GMM, FSKSM, UTM INTRODUCTION

INTRODUCTION TO CGI PROGRAMMING By Jumail Bin Taliba, GMM, FSKSM, UTM INTRODUCTION INTRODUCTION TO CGI PROGRAMMING By Jumail Bin Taliba, GMM, FSKSM, UTM 2003 1. INTRODUCTION What is CGI? CGI-which stands for Common Gateway Interface- is a protocol (a way of doing things), not a programming

More information

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML Outline INTRODUCTION TO WEB DEVELOPMENT AND HTML Introducing Forms The element Focus Sending form data to the server Exercise Lecture 07: Forms - Spring 2013 Introducing Form Any form is declared

More information

CHAPTER 18. Page Tracking Script

CHAPTER 18. Page Tracking Script CHAPTER 18 Page Tracking Script OVERVIEW The page tracking script follows a user from page to page on a particular site. In addition to tracking which pages a user views, the script records the major category

More information

Lab 4: Basic PHP Tutorial, Part 2

Lab 4: Basic PHP Tutorial, Part 2 Lab 4: Basic PHP Tutorial, Part 2 This lab activity provides a continued overview of the basic building blocks of the PHP server-side scripting language. Once again, your task is to thoroughly study the

More information

Appendix 3: Using the Exsys CORVID Servlet Runtime

Appendix 3: Using the Exsys CORVID Servlet Runtime Appendix 3: Using the Exsys CORVID Servlet Runtime The Exsys CORVID Ver 2 provides a powerful new way to deliver CORVID expert systems to end users. The new Exsys CORVID Servlet Runtime is a Java servlet

More information

Surveyor Getting Started Guide

Surveyor Getting Started Guide Surveyor Getting Started Guide This Getting Started Guide shows you how you can get the most out of Surveyor from start to finish. Surveyor can accomplish a number of tasks that will be extremely beneficial

More information

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 FORMS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: How to use forms and the related form types. Controls for interacting with forms. Menus and presenting users with

More information

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications Internet and Intranet Protocols and Applications Lecture 7b: HTTP Feb. 24, 2004 Arthur Goldberg Computer Science Department New York University artg@cs.nyu.edu WWW - HTTP/1.1 Web s application layer protocol

More information

COMP519 Practical 14 Python (5)

COMP519 Practical 14 Python (5) COMP519 Practical 14 Python (5) Introduction This practical contains further exercises that are intended to familiarise you with Python Programming. While you work through the tasks below compare your

More information

HTTP Protocol and Server-Side Basics

HTTP Protocol and Server-Side Basics HTTP Protocol and Server-Side Basics Web Programming Uta Priss ZELL, Ostfalia University 2013 Web Programming HTTP Protocol and Server-Side Basics Slide 1/26 Outline The HTTP protocol Environment Variables

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 20

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 20 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 20 LAST TIME: UNIX PROCESS MODEL Began covering the UNIX process model and API Information associated with each process: A PID (process ID) to

More information

Javascript, Java, Flash, Silverlight, HTML5 (animation, audio/video, ) Ajax (asynchronous Javascript and XML)

Javascript, Java, Flash, Silverlight, HTML5 (animation, audio/video, ) Ajax (asynchronous Javascript and XML) Web technologies browser sends requests to server, displays results DOM (document object model): structure of page contents forms / CGI (common gateway interface) client side uses HTML/CSS, Javascript,

More information

Shankersinh Vaghela Bapu Institue of Technology

Shankersinh Vaghela Bapu Institue of Technology Branch: - 6th Sem IT Year/Sem : - 3rd /2014 Subject & Subject Code : Faculty Name : - Nitin Padariya Pre Upload Date: 31/12/2013 Submission Date: 9/1/2014 [1] Explain the need of web server and web browser

More information

Lecture 9 Server Browser Interactions

Lecture 9 Server Browser Interactions Lecture 9 Server Browser Interactions SE-805 Web 2.0 Programming (supported by Google) http://my.ss.sysu.edu.cn/courses/web2.0/ School of Software, Sun Yat-sen University Outline More HTML Forms Submitting

More information

CMPE 151: Network Administration. Servers

CMPE 151: Network Administration. Servers CMPE 151: Network Administration Servers Announcements Unix shell+emacs tutorial. Basic Servers Telnet/Finger FTP Web SSH NNTP Let s look at the underlying protocols. Client-Server Model Request Response

More information

Forms iq Designer Training

Forms iq Designer Training Forms iq Designer Training Copyright 2008 Feith Systems and Software, Inc. All Rights Reserved. No part of this publication may be reproduced, transmitted, stored in a retrieval system, or translated into

More information

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT. Chapter 7:- PHP Compiled By:- Assistant Professor, SVBIT. Outline Starting to script on server side, Arrays, Function and forms, Advance PHP Databases:-Basic command with PHP examples, Connection to server,

More information

CS Exam 1 Review Suggestions - Spring 2017

CS Exam 1 Review Suggestions - Spring 2017 CS 328 - Exam 1 Review Suggestions p. 1 CS 328 - Exam 1 Review Suggestions - Spring 2017 last modified: 2017-02-16 You are responsible for material covered in class sessions and homeworks; but, here's

More information

Web insecurity Security strategies General security Listing of server-side risks Language specific security. Web Security.

Web insecurity Security strategies General security Listing of server-side risks Language specific security. Web Security. Web Security Web Programming Uta Priss ZELL, Ostfalia University 2013 Web Programming Web Security Slide 1/25 Outline Web insecurity Security strategies General security Listing of server-side risks Language

More information

Introduction to Programming (Python) (IPP) CGI Programming. $Date: 2010/11/25 09:18:11 $ IPP-15 1

Introduction to Programming (Python) (IPP) CGI Programming. $Date: 2010/11/25 09:18:11 $ IPP-15 1 Introduction to Programming (Python) (IPP) CGI Programming $Date: 2010/11/25 09:18:11 $ 1 Static web pages The simplest web-based interaction is when your browser (the client) gets sent a file encoded

More information

3. WWW and HTTP. Fig.3.1 Architecture of WWW

3. WWW and HTTP. Fig.3.1 Architecture of WWW 3. WWW and HTTP The World Wide Web (WWW) is a repository of information linked together from points all over the world. The WWW has a unique combination of flexibility, portability, and user-friendly features

More information

Hypertext Transport Protocol

Hypertext Transport Protocol Hypertext Transport Protocol HTTP Hypertext Transport Protocol Language of the Web protocol used for communication between web browsers and web servers TCP port 80 HTTP - URLs URL Uniform Resource Locator

More information

Final Exam. IT 3203 Introduction to Web Development. Rescheduling Final Exams. PHP Arrays. Arrays as Hashes. Looping over Arrays

Final Exam. IT 3203 Introduction to Web Development. Rescheduling Final Exams. PHP Arrays. Arrays as Hashes. Looping over Arrays IT 3203 Introduction to Web Development Introduction to PHP II April 5 Notice: This session is being recorded. Copyright 2007 by Bob Brown Final Exam The Registrar has released the final exam schedule.

More information

DAY 2. Creating Forms

DAY 2. Creating Forms DAY 2 Creating Forms LESSON LEARNING TARGETS I can identify and apply the different HTML tags to create a Web page form. I can describe the ways data is sent in a form in namevalue pairs. I can create

More information

Spring 2014 Interim. HTML forms

Spring 2014 Interim. HTML forms HTML forms Forms are used very often when the user needs to provide information to the web server: Entering keywords in a search box Placing an order Subscribing to a mailing list Posting a comment Filling

More information

Web History. Systemprogrammering 2006 Föreläsning 9 Web Services. Internet Hosts. Web History (cont) 1945: 1989: Topics 1990:

Web History. Systemprogrammering 2006 Föreläsning 9 Web Services. Internet Hosts. Web History (cont) 1945: 1989: Topics 1990: Systemprogrammering 2006 Föreläsning 9 Web Services Topics HTTP Serving static content Serving dynamic content 1945: 1989: Web History Vannevar Bush, As we may think, Atlantic Monthly, July, 1945. Describes

More information

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11 Attacks Against Websites Tom Chothia Computer Security, Lecture 11 A typical web set up TLS Server HTTP GET cookie Client HTML HTTP file HTML PHP process Display PHP SQL Typical Web Setup HTTP website:

More information

Database Systems Fundamentals

Database Systems Fundamentals Database Systems Fundamentals Using PHP Language Arman Malekzade Amirkabir University of Technology (Tehran Polytechnic) Notice: The class is held under the supervision of Dr.Shiri github.com/arman-malekzade

More information

Giving credit where credit is due

Giving credit where credit is due CSCE 230J Computer Organization Web Services Dr. Steve Goddard goddard@cse.unl.edu Giving credit where credit is due Most of slides for this lecture are based on slides created by Drs. Bryant and O Hallaron,

More information

Chapters. Web-Technologies I 1

Chapters. Web-Technologies I 1 Web-Technologies Chapters Server-Side Programming: Methods for creating dynamic content Web-Content-Management Excurse: Server Apache Client-Side Programming (Next Lesson) Web-Services (Next Lesson) Search

More information

FIREFOX MENU REFERENCE This menu reference is available in a prettier format at

FIREFOX MENU REFERENCE This menu reference is available in a prettier format at FIREFOX MENU REFERENCE This menu reference is available in a prettier format at http://support.mozilla.com/en-us/kb/menu+reference FILE New Window New Tab Open Location Open File Close (Window) Close Tab

More information

UNIT-VI CREATING AND USING FORMS

UNIT-VI CREATING AND USING FORMS UNIT-VI CREATING AND USING FORMS To create a fully functional web application, you need to be able to interact with your users. The common way to receive information from web users is through a form. Forms

More information

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP Course Topics IT360: Applied Database Systems Introduction to PHP Database design Relational model SQL Normalization PHP MySQL Database administration Transaction Processing Data Storage and Indexing The

More information

July EDGAR Filer Manual (Volume I)

July EDGAR Filer Manual (Volume I) 6. INTRODUCTION TO FILING ON EDGAR 6.1 Preparation and Submission After you have completed your application to submit filings on EDGAR, you will be ready for the filing process. The SEC provides a number

More information

Introduction. Server-side Techniques. Introduction. 2 modes in the PHP processor:

Introduction. Server-side Techniques. Introduction. 2 modes in the PHP processor: Introduction Server-side Techniques PHP Hypertext Processor A very popular server side language on web Code embedded directly into HTML documents http://hk2.php.net/downloads.php Features Free, open source

More information

Creating and Building Websites

Creating and Building Websites Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 7 Slide 1 of 25 Week 7 Unfinished

More information

Microsoft IIS version 6 Integration

Microsoft IIS version 6 Integration Microsoft IIS version 6 Integration Contents 1 Overview 2 Prerequisites 3 PINsafe Configuration 4 Configuring the IIS Server 4.1 Install the PINsafeIISFilter.exe 4.2 Configure the ISAPI filter 4.3 Create

More information

A Sample Approach to your Project

A Sample Approach to your Project A Sample Approach to your Project An object-oriented interpreted programming language Python 3 :: Flask :: SQLite3 A micro web framework written in Python A public domain, barebones SQL database system

More information

cwhois Manual Copyright Vibralogix. All rights reserved.

cwhois Manual Copyright Vibralogix. All rights reserved. cwhoistm V2.12 cwhois Manual Copyright 2003-2015 Vibralogix. All rights reserved. This document is provided by Vibralogix for informational purposes only to licensed users of the cwhois product and is

More information

Webshop Plus! v Pablo Software Solutions DB Technosystems

Webshop Plus! v Pablo Software Solutions DB Technosystems Webshop Plus! v.2.0 2009 Pablo Software Solutions http://www.wysiwygwebbuilder.com 2009 DB Technosystems http://www.dbtechnosystems.com Webshos Plus! V.2. is an evolution of the original webshop script

More information

PERL. Pattern Extraction and Reporting Language. Example: $x = 10 $value = $x + 1 $word = "hello"

PERL. Pattern Extraction and Reporting Language. Example: $x = 10 $value = $x + 1 $word = hello PERL Pattern Extraction and Reporting Language Example: Web page serving through CGI: Perl is used extensively in serving up content when run in concert with a web-server. Talking to web sites and reporting

More information

COMP519 Web Programming Autumn CGI Programming

COMP519 Web Programming Autumn CGI Programming COMP519 Web Programming Autumn 2015 CGI Programming CGI Programming These lectures notes are designed to: Teach you how to use CGI in server-side programming Use environmental variables in Python Access

More information

(Worth 50% of overall Project 1 grade)

(Worth 50% of overall Project 1 grade) 第 1 页共 8 页 2011/11/8 22:18 (Worth 50% of overall Project 1 grade) You will do Part 3 (the final part) of Project 1 with the same team as for Parts 1 and 2. If your team partner dropped the class and you

More information

Parallel Programming Pre-Assignment. Setting up the Software Environment

Parallel Programming Pre-Assignment. Setting up the Software Environment Parallel Programming Pre-Assignment Setting up the Software Environment Authors: B. Wilkinson and C. Ferner. Modification date: Aug 21, 2014 (Minor correction Aug 27, 2014.) Software The purpose of this

More information

COMP284 Practical 3 Perl (3)

COMP284 Practical 3 Perl (3) COMP284 Practical 3 Perl (3) Introduction This practical contains further exercises that are intended to familiarise you with Perl Programming. While you work through the tasks below compare your results

More information

CS 161 Computer Security

CS 161 Computer Security Paxson Spring 2017 CS 161 Computer Security Discussion 4 Week of February 13, 2017 Question 1 Clickjacking (5 min) Watch the following video: https://www.youtube.com/watch?v=sw8ch-m3n8m Question 2 Session

More information

OU EDUCATE TRAINING MANUAL

OU EDUCATE TRAINING MANUAL OU EDUCATE TRAINING MANUAL OmniUpdate Web Content Management System El Camino College Staff Development 310-660-3868 Course Topics: Section 1: OU Educate Overview and Login Section 2: The OmniUpdate Interface

More information

DC71 INTERNET APPLICATIONS JUNE 2013

DC71 INTERNET APPLICATIONS JUNE 2013 Q 2 (a) With an example show text formatting in HTML. The bold text tag is : This will be in bold. If you want italics, use the tag, as follows: This will be in italics. Finally, for

More information

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "

<!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN CS 200 Assignment 7 HTML Due Tuesday June 30 at 9:00 am Please read the submission instructions on page 7 carefully, especially if you will be working on the assignment past the due date. To access your

More information

Implementing a Web Server on OS/390: Part III Writing Common Gateway Interfaces and Installing Java Virtual Machine

Implementing a Web Server on OS/390: Part III Writing Common Gateway Interfaces and Installing Java Virtual Machine BY PATRICK RENARD Implementing a Web Server on OS/390: Part III Writing Common Gateway Interfaces and Installing Java Virtual Machine This article presents programming techniques to write Common Gateway

More information

Programming for the Web with PHP

Programming for the Web with PHP Aptech Ltd Version 1.0 Page 1 of 11 Table of Contents Aptech Ltd Version 1.0 Page 2 of 11 Abstraction Anonymous Class Apache Arithmetic Operators Array Array Identifier arsort Function Assignment Operators

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 8 HTML Forms and Basic CGI Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you will

More information

CGI Subroutines User's Guide

CGI Subroutines User's Guide FUJITSU Software NetCOBOL V11.0 CGI Subroutines User's Guide Windows B1WD-3361-01ENZ0(00) August 2015 Preface Purpose of this manual This manual describes how to create, execute, and debug COBOL programs

More information

PHP Hypertext Preprocessor

PHP Hypertext Preprocessor PHP Hypertext Preprocessor A brief survey Stefano Fontanelli stefano.fontanelli@sssup.it January 16, 2009 Stefano Fontanelli stefano.fontanelli@sssup.it PHP Hypertext Preprocessor January 16, 2009 1 /

More information

NATE Testing Portal. Guide to using the mynate website

NATE Testing Portal. Guide to using the mynate website NATE Testing Portal Guide to using the mynate website Training and Testing NATE Policy Changes NATE has reversed the policy decision that specified someone who trains HVAC/R cannot proctor the NATE exam.

More information

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser. Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible

More information

CSc 337 Final Examination December 13, 2013

CSc 337 Final Examination December 13, 2013 On my left is: (NetID) MY NetID On my right is: (NetID) CSc 337 Final Examination December 13, 2013 READ THIS FIRST Read this page now but do not turn this page until you are told to do so. Go ahead and

More information

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS The Absolute Form Processor is very easy to use. In order to operate the system, you just need the menu at the top of the screen. There, you ll find all the

More information