• Like
Passing data in cgi
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Passing data in cgi

  • 2,037 views
Published

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,037
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
3
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Sending Data CISIWEB 430A
  • 2. Objectives
    • In this unit, you will
      • Create a hyperlink to a CGI script
      • Append data to a URL
      • Use the CGI.pm module to parse data
      • Access data using the param function
  • 3. print Function
    • Used to send output to a location
      • Syntax: print output; where output is some information you want to see displayed
      • The output can be an expression or several expressions separated by commas. These expressions can be literal values, variables, or even functions
  • 4. Passing data through a hyperlink
    • Syntax: <A HREF=”URL? key=value ”>hyperLinkText</A>
    • Key and value should both be one word
      • If not, you have to use the “+” symbol instead of spaces
  • 5. Parsing Data
    • Once you pass information to a script, you parse the information (or process)
    • Parsing routines are already written
      • CGI.pm (.pm stands for perl module)
      • We only need the standard portion of the module
      • To use a module, use CGI
      • Use CGI (“:standard”);, or use CGI qw(:standard);
        • qw stands for ‘quote word’
        • qw is used in place of quotations, more widely used than the quotation marks
  • 6. Getting the data
    • By using the CGI.pm module, we are already parsing the data
    • Once the data is parsed, it can be accessed through the key
      • Perl uses the param function
      • Syntax:param (key)
    • Sending multiple items of data
      • Separate key/value pairs with an ampersand (&)