URL Encoding When data is entered on a Web page form, it must be encoded before it can be passed to some program for processing. Each element on the form.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Using Perl for CGI Programming.
Advertisements

Microsoft Expression Web-Illustrated Unit J: Creating Forms.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
The Web Warrior Guide to Web Design Technologies
CS 330 Programming Languages 10 / 14 / 2008 Instructor: Michael Eckmann.
Using KompoZer -- a web editor A collection of video tutorials
JavaScript Forms Form Validation Cookies CGI Programs.
CS 330 Programming Languages 10 / 11 / 2007 Instructor: Michael Eckmann.
1 September 6, 2005CS150 Introduction to Computer Science I What Actions Do We Have Part 1 CS150 Introduction to Computer Science I.
HTML Primer Basics of HTML for those who haven’t used it before.
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Using Entities & Creating Forms Jill R. Sommer Institute for Applied Linguistics Kent State University.
1 ‘Dynamic’ Web Pages So far, we have developed ‘static’ web-pages, e.g., cv.html, repair.html and order.html. There is often a requirement to produce.
Chapter 9 Using Perl for CGI Programming. Computation is required to support sophisticated web applications Computation can be done by the server or the.
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
Introduction to PHP and Server Side Technology. Slide 2 PHP History Created in 1995 PHP 5.0 is the current version It’s been around since 2004.
Chapter 4 Handling User Input PHP Programming with MySQL 2nd Edition
Lecture 6 – Form processing (Part 1) SFDV3011 – Advanced Web Development 1.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
JavaScript, Fourth Edition
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
2 1 Sending Data Using a Hyperlink CGI/Perl Programming By Diane Zak.
CP476 Internet Computing CGI1 CGI is a common way to provide for specific computations on server side, interactions with users, or access to databases.
USING PERL FOR CGI PROGRAMMING
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
Just Enough HTML How to Create Basic HTML Documents.
Chapter 8 Cookies And Security JavaScript, Third Edition.
INTRODUCTION. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language,
Regular Expression (continue) and Cookies. Quick Review What letter values would be included for the following variable, which will be used for validation.
Lesson 7 – World Wide Web. What is the World Wide Web?  The content of the worldwide web is held on individual web pages gathered together to form websites.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Using Perl for CGI Programming.
Welcome to Biology Class of 2014!! Your teacher is: Mrs. Linda Pellegrini This presentation will get you and your laptop ready for this coming year!
ITCS373: Internet Technology Lecture 5: More HTML.
3 1 Sending Data Using an Online Form CGI/Perl Programming By Diane Zak.
1 HTML Forms
Introducing the World Wide Web Internet- a structure made up of millions of interconnected computers whose users communicate with each other and share.
XP Tutorial 8 Adding Interactivity with ActionScript.
Netprog 2002 CGI Programming1 CGI Programming CLIENT HTTP SERVER CGI Program http request http response setenv(), dup(), fork(), exec(),...
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
HTML Hyper Text Markup Language 1BFCET BATHINDA. Definitions Web server: a system on the internet containing one or more web site Web site: a collection.
Internal and External Links Web Design – Section 3-6 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 7 - Introduction to Common Gateway Interface (CGI) Outline 7.1Introduction 7.2A Simple HTTP Transaction.
Lecy ∙ Data-Driven Management Lecture 12 Building Shiny Apps.
HTML Chapter 4 Source: CSE 190 M (Web Programming) lecture notes, es/slides/lecture02-basic_xhtml.html.
CIS Intro to JAVA Lecture Notes Set July-05 GUI Programming –TextField Action Listeners, JEditorPane action listeners, HTML in a JEditorPane,
HTML Forms. A form is simply an area that can contain form fields. Form fields are objects that allow the visitor to enter information - for example text.
IT’S OUR FAVORITES!! Delicious: It’s What’s for Dinner.
Tableau Server URL Parameterization and Limits. Background This short set of material covers how Tableau Server Views can be invoked via URLs while passing.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring Forms, HTML5 layout.
1 Project 3 String Methods. Project 3: String Methods Write a program to do the following string manipulations: Prompt the user to enter a phrase and.
1 HTML Forms
©2003 Paula Matuszek GOOGLE API l Search requests: submit a query string and a set of parameters to the Google Web APIs service and receive in return a.
CSCI 130 Basic Input and Output Chapter 9. The printf ( ) function Printf(“\nThe value of x is %d”, x); Displayed to screen (assume x = 12): –The value.
CIS 228 The Internet 12/6/11 Forms and Validation.
INTERNET APPLICATIONS CPIT405 Forms, Internal links, meta tags, search engine friendly websites.
1 UNIT 13 The World Wide Web. Introduction 2 The World Wide Web: ▫ Commonly referred to as WWW or the Web. ▫ Is a service on the Internet. It consists.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
Server Object Server Object. The Server object represents a programmable interface to the HTTP service that provides a mechanism to administer and control.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
How to Write Web Forms By Mimi Opkins.
Intro to PHP & Variables
In Class Program: Today in History
WEB PROGRAMMING JavaScript.
Forms, cont’d.
C Graphing Functions.
Requests and Server Response Codes
How to Reprint Barcodes
PHP-II.
Presentation transcript:

URL Encoding When data is entered on a Web page form, it must be encoded before it can be passed to some program for processing. Each element on the form has a name (key), and a value. Data is represented by a key-value pair. For example, a field representing age with a value of 30, would appear in the input stream as: age=30

URL Encoding Rules Each key-value pair is separated by the ampersand (&) character. Spaces are replaced with the plus sign (+) character. All other special characters are replaced with their hexadecimal equivalent, in the form %nn. A response of 01/22/2001 for today’s date would be: today=01%2F22%2F2001 since %2F is the hexadecimal equivalent of the slash (/) character.

Write a C++ program to parse a character string, as received from a web browser, into its component parts. Following is a sample form, the resulting encoded string, and the desired output. You should label and split the key-value pairs as shown. Assume you have the character string available in a file called testData.txt. Don’t worry about the form itself, it is just for reference. Don’t worry about the names of the elements (the keys) I used T1,T2,T3,S1,S2,S3 and B1 in my example. This is simply a character string processing problem. All you need to know are the encoding rules!

9898&S1=CIS111%2C+CIS115+%28The+Internet%29%2C+M AT100&S2=I+need+it+for+my+degree.&S3=I+am+intere sted+in+anything+to+do+with+the+Internet%21%21%0 D%0AWill+there+be+many+programs+to+write+in+this +course%3F&B1=Submit testData.txt (This is what is passed to the parsing program)

field name: T1 field content: A New Student field name: T3 field content: field name: T2 field content: field name: S1 field content: CIS111, CIS115 (The Internet), MAT100 field name: S2 field content: I need it for my degree. field name: S3 field content: I am interested in anything to do with the Internet!! Will there be many programs to write in this course? field name: B1 field content: Submit Press any key to continue