lecture 35 week10 CGI

Lecture 35 week10 - TEACHER'S Unix C GNU HTML Perl Python NOTES COMP 206 Joseph Vybihal 2007 Software Systems 1 Unix C GNU HTML Perl Python

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 1 TEACHER'S NOTES
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 2 CGI (optional Introduction to Perl) Comp-206 : Introduction to Software Systems Week 10 Joseph Vybihal Computer Science McGill University
Background image of page 2
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 3 Announcements Course Evaluations online
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 4 Part 1 CGI
Background image of page 4
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 5 CGI Common Gateway Interface The method HTML uses to communicate between the user and the server. The <FORM> Tag Permits dialog boxes to be displayed Permits buttons to be displayed Transmits filled boxes to the server Executes a selected program on the server to process the filled in boxes
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 6 Forms They are delimited using the <form> tag. There are two ways to send this data : Post Get Sub-components of forms (the place where you write data) are mostly <input> tags.
Background image of page 6
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 7 Post vs. Get The GET method Transfers the data inside the query string. This is usually easy to recognize : http://www.google.ca/search?q=test&ie=utf-8&oe=utf- Allows the easy use of “Back” buttons Easier to debug However, less secure since text is transferred in the query (and logged by the server)
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 8 Post vs. Get The POST method Transfers the data as part of the query packet. Doesn't change the query string, thus more secure data not automatically logged Doesn't always work well with back buttons Warning messages about data needed to be posted again More difficult to debug Need special software to read “POST”
Background image of page 8
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 9 Input Most input components use the <input> tag. Text fields: <input type="text" name="firstname"> Radio buttons <input type="radio" name="sex" value="male"> Male <br /> <input type="radio" name="sex" value="female"> Female Checkboxes: <input type="checkbox" name="bike"> Components that must be grouped together should all use the same name.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 10 Submitting Input To submit a form, you will need a submit button. Buttons are also defined using <input> tag.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/30/2011.

Page1 / 56

Lecture 35 week10 - TEACHER'S Unix C GNU HTML Perl Python NOTES COMP 206 Joseph Vybihal 2007 Software Systems 1 Unix C GNU HTML Perl Python

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online