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

Size: px
Start display at page:

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

Transcription

1 INTRODUCTION TO CGI PROGRAMMING By Jumail Bin Taliba, GMM, FSKSM, UTM INTRODUCTION What is CGI? CGI-which stands for Common Gateway Interface- is a protocol (a way of doing things), not a programming language. That means that it s the usual way that servers talk to the programs that are interact with. Therefore, any program that sends or receives information from a server needs to follow the standards specified by CGI. What is program? A program is a collection of lines of commands-which is called code- that contain instructions for the computer. The program was written using programming language such as C, C++, Pascal and Perl. So, any programs that are written to follow the standards specified by the CGI were called CGI Programs. What is script? Sometimes we use the term CGI Script instead of CGI Program. Generally, they are same thing, which is a program that written in CGI s specification. Technically, the basic difference is that CGI Programs are compiled so they ll run more quickly on particular operating systems while CGI Scripts are just text files that are interpreted necessary. The CGI programs were written using Compiler-based programming languages such as C, C++ and Pascal while CGI scripts were written using Interpreter-based programming languages such as Perl, ASP and PHP. Actually, most of the common programming languages can be used to write CGI scripts or programs. But one of the most important things to be considered is the languages should support string manipulations. What is the CGI Programming? The concept of CGI programming is very simple. Basically, we write a program, which will create html document. Traditionally, the html page was created using text editor. In CGI programming, instead of manually-coded (using text editor), we write a program (called cgi program) that will create the html page. The html page consists of collections of string. That s why, any programming languages that will be used to write cgi program should supports string manipulations. So, before you can write a cgi program, you have to understand the string manipulations (i.e.: how to read/write input/output from/to file, how to chunk string, how to merge string, etc) and understanding in writing HTML. Why C language? Many people use Perl to write their cgi scripts in order to make their web pages interactive. But, in this tutorial we ll write CGI programs (not scripts) using Borland C++ ver I expect that you have experiences in writing a program using C language. We don t want to waste time to learn a language that is new for us-such as Perl. The most important things are to understand the concept of CGI programming. After you get depth understanding of the concept, you can easy to move to any languages include Perl. In addition, we ll use Xitami as the Web Server. Actually, there are several web servers available includes provided by Microsoft (IIS on NT/2000 or PWS on Win 98). I choose Xitami because it is easy to setup and easy to run and administer. By the way, it s free.

2 2. INSTALLING XITAMI WEB SERVER To install Xitami: 1. Download the latest version of Xitami for your particular version of Windows from 2. Run the server s install program by double-clicking the file you just downloaded. The file I downloaded was called bs3224d9.exe, though future versitons will probably have slightly different- but perhaps equally obliquenames. Figure 4.1: You can accept the default directory (C:\Xitami) 3. Accept the default configurations, including where the server is installed (Figure 4.1) and to which program manager group its icons are added. 4. Choose and administrator name and password and write them down somewhere you can find them again (Figure 4.2). You ll need them if you decide to change the server s configurations. 5. Select server profile (not shown). I recommended Turbo if you re just planning on running the server for testing your cgi program and don t have to worry about other people accessing your pages. Figure 4.2.: Set Admin Password 6. At the end of the installation, click Run to start up the Xitami server right away. When Xitami is running, you ll see a green icon with an X in the System Tray at the right (or bottom) end of the Taskbar (Figure 4.3) Figure 4.3.: Server Profile: Reccomended: Turbo

3 3. CONFIGURING THE SERVER To configure the server: 1. For Windows 2002, go to control panel and click the icon. 2. For Windows 95/98, go to Start Menu->Internet Tools Folder. Default Settings: Home directory: webpages Directory path: C:\Xitami\webpages\. Put all your html pages in this directory. To access a html page, for example login.htm, type Put all your image files in images directory-which is inside the webpages directory. To refer an image (for example logo.gif), use url address,

4 Put all your downloadable files in files directory-which also inside the webpages directory. You should create yourself. To refer a file (for example faq.txt) use url address, CGI Directory: cgi-bin Directory path: C:\Xitami\cgi-bin\ If this directory does not exists, you need to create yourself. Put all your cgi programs in this directory. To refer a cgi program (for example login.exe) use url address, 4. TESTING THE SERVER 1. Open any web browser (i.e: Microsoft Internet Exploerer or Netscape Navigator). 2. Enter the URL: 3. Then you suppose see the Xitami homepage.

5 4. TESTING CGI PROGRAM 1. Write a simple CGI program (testcgi.c) using Borland C (See sample codes below). 2. Then, compile the program. 3. Copy the executable file (testcgi.exe) into C:\Xitami\cgi-bin directory. 4. To run the program, in the web browser type: Tips: To skip the step 3, set the Borland C++ options. Open the Project Options Dialog box (go to menu Options->Project ). Then set the Final directory to c:\xitami/cgi-bin. Important: Make sure you put this statements: fprintf(stdout,"content-type: text/html\n\n"); #include <stdio.h> void main(void) { fprintf(stdout,"content-type: text/html\n\n"); fprintf(stdout,"<html>\n"); fprintf(stdout,"<head> <TITLE>Testing CGI Program</TITLE> </HEAD>\n"); fprintf(stdout,"<body>\n"); fprintf(stdout,"if you can read this message <BR>, that's mean the CGI program working properly"); fprintf(stdout,"</body>\n"); fprintf(stdout,"</html>\n"); Simple CGI program: testcgi.c Output of the testcgi.exe cgi program

6 5. GETTING DATA FROM USERS 1. Write a HTML file to create simple HTML form (See sample form below). 2. Put the html file (form.html) into c:\xitami\webpages directory. 3. To open the form, in the web brower type: Notes: You also can create the form using cgi program (See the sample codes in <HTML> <HEAD> <TITLE> Data Entry Form</TITLE> </HEAD> <BODY> <FORM Name="DataEntry" Method="POST" Action=" Nama: <INPUT Name="Nama" Type="Text" size="50"> <BR> No KP: <INPUT Name="NoKP" Type="Text" size="15"> <BR> Kursus: <SELECT Name="Kursus"> <OPTION Value="DCK" SELECTED>DCK <OPTION Value="SCK">SCK </SELECT> <BR> Alamat:<BR> <TEXTAREA Name="Alamat" COLS="50" ROWS="5"> </TEXTAREA> <BR><BR> <INPUT Name="Submit" Type="Submit" Value="Submit"> <INPUT Name="Clear" Type="Reset" Value="Clear"> <BR> </FORM> </BODY> </HTML> HTML script file to create form: form.html HTML Form

7 4. Write a cgi program (process_form.c) that will receive inputs from the form and process them (See the codes below). 5. After you compile the program, make sure the executable file (process_form.exe) was placed in C:\Xitami\cgi-bin directory #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ char *name; char *value; symbol; symbol *SYMBOLTABLE; int SYMBOLCOUNT=0; void DecodeData(char *data); void SplitData(const char *data); char *GetString(const char *name); int GetInteger(const char *name); char *ReplaceStr(char *buffer,char *s1, char *s2); void CreateSymbolTable(void); void DestroySymbolTable(void); void main(void) { char *Nama, *NoKP, *Kursus, *Alamat; fprintf(stdout,"content-type: text/html%c%c",10,10); fprintf(stdout,"<html>\n"); fprintf(stdout,"<head> <TITLE> Feedback </TITLE> </HEAD>\n"); fprintf(stdout,"<body>\n"); CreateSymbolTable(); Nama=GetString("Nama"); NoKP=GetString("NoKP"); Kursus=GetString("Kursus"); Alamat=GetString("Alamat"); ReplaceStr(Alamat,"\n","<BR>"); fprintf(stdout,"<b> YOUR INFORMATIONS WAS SUCCESSFULLY SUBMITTED AS BELOW: </B> <BR><BR> \n"); fprintf(stdout,"nama: <BR>\n"); fprintf(stdout,"<b> %s </B> <BR><BR>\n",Nama); fprintf(stdout,"no KP: <BR>\n"); fprintf(stdout,"<b> %s </B> <BR><BR>\n", NoKP); fprintf(stdout,"kursus: <BR>\n"); fprintf(stdout,"<b> %s </B> <BR><BR>\n",Kursus); fprintf(stdout,"alamat: <BR>\n"); fprintf(stdout,"<b> %s </B> <BR><BR>\n",Alamat); fprintf(stdout,"</body>\n"); fprintf(stdout,"</html>\n"); DestroySymbolTable();

8 void CreateSymbolTable(void) { char *sdata_length; int data_length; char *data; sdata_length=getenv("http_content_length"); data_length=atoi(sdata_length); data=(char*)malloc(data_length+1); fread(data,data_length,1,stdin); DecodeData(data); SplitData(data); free(data); char *GetString(const char *name) {int i; for (i=0;i<symbolcount;i++){ if (!strcmp(name,symboltable[i].name)){ return strdup(symboltable[i].value); return NULL; int GetInteger(const char *name) {char *temp; temp=getstring(name); if (temp) return atoi(temp); return 0; /* */ void DecodeData(char *data) {unsigned int i; char s[5]; char *temp=strdup(data); char hex[3]; unsigned char num; strcpy(data,""); for (i=0;i<strlen(temp);i++) { switch (temp[i]){ case '+': strcpy(s," "); break; case '%': sprintf(hex,"%c%c",temp[i+1],temp[i+2]); i+=2; sscanf(hex,"%x",&num); sprintf(s,"%c",num); break; default: sprintf(s,"%c",temp[i]); strcat(data,s); free(temp);

9 void SplitData(const char *data) {unsigned int i; int var_count=1; char *item; //eg: Nama=Zulkefli Bin Mahmod char *p; char *temp=strdup(data); char *n,*v; if (!temp) return; //Calculate number of variables in the stream data for (i=0;i<strlen(temp);i++) if (temp[i]=='&') var_count++; //Allocate memory for the Symbol Table SYMBOLTABLE=(symbol *)malloc(var_count*sizeof(symbol)); SYMBOLCOUNT=var_count; var_count=0; p=strtok(temp,"&"); while (p){ temp=p+strlen(p)+1; item=strdup(p); n=strtok(item,"="); v=n+strlen(n)+1; SYMBOLTABLE[var_count].name=strdup(n); SYMBOLTABLE[var_count++].value=strdup(v); //p=strtok(null,"&"); p=strtok(temp,"&"); void DestroySymbolTable(void) {free(symboltable); char *ReplaceStr(char *buffer, char *s1, char *s2) {char *tail,*ps; ps=strstr(buffer,s1); if (!ps) return buffer; while (ps){ tail=strdup(ps+strlen(s1)); ps[0]=null; buffer=strcat(buffer,s2); buffer=strcat(buffer,tail); ps=strstr(buffer,s1); return strdup(buffer); A CGI program to process the inputs from the form: process_form.c

10 6. Now, we are going to test the program. Fill in the form and click the Submit button. 7. All your input will be sent to cgi program process_form.exe and produce output as shown below: Fill in the form Result from the cgi program process_form.exe

11 Notes Actually, all data that you input will be encoded by the web browser before it submitted to the cgi program process_form.exe. For example, all space character were converted to + sign, comma were converted to %2C, new line character ( \n ) were converted to %0D%0A and so forth. %2C represent an ascii code in hexadecimal for + character. The data then merged into a single long stream in series of &Name=Value pattern. Example data that submitted from the web browser to the CGI program: Nama=Zulkefli+Bin+Mahmood&NoKP= &Kursus=DCK&Alamat=Fakulti+Sains+Komputer+dan+Sistem+ Maklumat%2C%0D%0AUniversiti+Teknologi+Malaysia%2C%0D%0A Skudai%2C%0D%0AJohor.&Submit=Submit So, in the cgi program we need to do the opposite processes. We need to decode the stream data and then split it into their variables, before we can use the variables.

USQ/CSC2406 Web Publishing

USQ/CSC2406 Web Publishing USQ/CSC2406 Web Publishing Lecture 4: HTML Forms, Server & CGI Scripts Tralvex (Rex) Yeap 19 December 2002 Outline Quick Review on Lecture 3 Topic 7: HTML Forms Topic 8: Server & CGI Scripts Class Activity

More information

COMP s1 Lecture 1

COMP s1 Lecture 1 COMP1511 18s1 Lecture 1 1 Numbers In, Numbers Out Andrew Bennett more printf variables scanf 2 Before we begin introduce yourself to the person sitting next to you why did

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

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

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

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

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

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

Slide Set 3. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Slide Set 3. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary Slide Set 3 for ENCM 339 Fall 2016 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2016 ENCM 339 Fall 2016 Slide Set 3 slide 2/46

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

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

How to Make a Contact Us PAGE in Dreamweaver

How to Make a Contact Us PAGE in Dreamweaver We found a great website on the net called http://dreamweaverspot.com and we have basically followed their tutorial for creating Contact Forms. We also checked out a few other tutorials we found by Googling,

More information

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018 Lecture 6: More Arrays & HTML Forms CS 383 Web Development II Monday, February 12, 2018 Lambdas You may have encountered a lambda (sometimes called anonymous functions) in other programming languages The

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

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

Form Processing in PHP

Form Processing in PHP Form Processing in PHP Forms Forms are special components which allow your site visitors to supply various information on the HTML page. We have previously talked about creating HTML forms. Forms typically

More information

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

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

COMP519: Web Programming Autumn 2015

COMP519: Web Programming Autumn 2015 COMP519: Web Programming Autumn 2015 In the next lectures you will learn What is SQL How to access mysql database How to create a basic mysql database How to use some basic queries How to use PHP and mysql

More information

Dynamic HTML becomes HTML5. HTML Forms and Server Processing. Form Submission to Web Server. DHTML - Mouse Events. CMST385: Slide Set 8: Forms

Dynamic HTML becomes HTML5. HTML Forms and Server Processing. Form Submission to Web Server. DHTML - Mouse Events. CMST385: Slide Set 8: Forms HTML Forms and Server Processing Forms provide a standard data entry method for users to send information to a web server Clicking button calls a script on server CGI = Common Gateway Interface CGI scripts

More information

JavaScript CSCI 201 Principles of Software Development

JavaScript CSCI 201 Principles of Software Development JavaScript CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline JavaScript Program USC CSCI 201L JavaScript JavaScript is a front-end interpreted language that

More information

CIS 2107 Computer Systems and Low-Level Programming Fall 2011 Midterm

CIS 2107 Computer Systems and Low-Level Programming Fall 2011 Midterm Fall 2011 Name: Page Points Score 1 5 2 10 3 10 4 7 5 8 6 15 7 4 8 7 9 16 10 18 Total: 100 Instructions The exam is closed book, closed notes. You may not use a calculator, cell phone, etc. For each of

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

Editing Webpages in N/Vu

Editing Webpages in N/Vu Editing Webpages in N/Vu 1. Opening pages to edit in N/Vu One of the first things we covered was the importance of opening your webpage within the application. That means that you can t simply double-click

More information

Integrating legacy software with a Web front end

Integrating legacy software with a Web front end Integrating legacy software with a Web fron... 1 of 6 http://web.archive.org/web/200006090127... Integrating legacy software with a Web front end How to solve your legacy access problems with Web-based

More information

,879 B FAT #1 FAT #2 root directory data. Figure 1: Disk layout for a 1.44 Mb DOS diskette. B is the boot sector.

,879 B FAT #1 FAT #2 root directory data. Figure 1: Disk layout for a 1.44 Mb DOS diskette. B is the boot sector. Homework 11 Spring 2012 File Systems: Part 2 MAT 4970 April 18, 2012 Background To complete this assignment, you need to know how directories and files are stored on a 1.44 Mb diskette, formatted for DOS/Windows.

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

CMPS 401 Survey of Programming Languages

CMPS 401 Survey of Programming Languages CMPS 401 Survey of Programming Languages Programming Assignment #4 PHP Language On the Ubuntu Operating System Write a PHP program (P4.php) and create a HTML (P4.html) page under the Ubuntu operating system.

More information

Slide Set 3. for ENCM 339 Fall 2017 Section 01. Steve Norman, PhD, PEng

Slide Set 3. for ENCM 339 Fall 2017 Section 01. Steve Norman, PhD, PEng Slide Set 3 for ENCM 339 Fall 2017 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2017 ENCM 339 Fall 2017 Section 01

More information

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14 C introduction Variables Variables 1 / 14 Contents Variables Data types Variable I/O Variables 2 / 14 Usage Declaration: t y p e i d e n t i f i e r ; Assignment: i d e n t i f i e r = v a l u e ; Definition

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

World Wide Web, etc.

World Wide Web, etc. World Wide Web, etc. Alex S. Raw data-packets wouldn t be much use to humans if there weren t many application level protocols, such as SMTP (for e-mail), HTTP & HTML (for www), etc. 1 The Web The following

More information

Lesson 3. Form By Raymond Tsang. Certificate Programme in Cyber Security

Lesson 3. Form By Raymond Tsang. Certificate Programme in Cyber Security Lesson 3 Form By Raymond Tsang Certificate Programme in Cyber Security What is a form How to create a form Getting input from users Generate a result It s a section of a document containing normal content,

More information

The CartIt Commerce System Installation Guide

The CartIt Commerce System Installation Guide The CartIt Commerce System Installation Guide On Windows Operating Systems Version 8.0 February 3, 2003 Copyright 2001 CartIt Corporation. All Rights Reserved. Page 1 of 10 THE CART IT COMMERCE SYSTEM

More information

CSCE C. Lab 10 - File I/O. Dr. Chris Bourke

CSCE C. Lab 10 - File I/O. Dr. Chris Bourke CSCE 155 - C Lab 10 - File I/O Dr. Chris Bourke Prior to Lab Before attending this lab: 1. Read and familiarize yourself with this handout. 2. Review the following free textbook resources: http://en.wikibooks.org/wiki/c_programming/file_io

More information

Using htmlarea & a Database to Maintain Content on a Website

Using htmlarea & a Database to Maintain Content on a Website Using htmlarea & a Database to Maintain Content on a Website by Peter Lavin December 30, 2003 Overview If you wish to develop a website that others can contribute to one option is to have text files sent

More information

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12 PIC 40A Lecture 19: PHP Form handling, session variables and regular expressions 05/25/12 Copyright 2011 Jukka Virtanen UCLA 1 How does a browser communicate with a program on a server? By submitting an

More information

Web Server Setup Guide

Web Server Setup Guide SelfTaughtCoders.com Web Server Setup Guide How to set up your own computer for web development. Setting Up Your Computer for Web Development Our web server software As we discussed, our web app is comprised

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

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

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

Carleton University Department of Systems and Computer Engineering SYSC Foundations of Imperative Programming - Winter 2012

Carleton University Department of Systems and Computer Engineering SYSC Foundations of Imperative Programming - Winter 2012 Carleton University Department of Systems and Computer Engineering SYSC 2006 - Foundations of Imperative Programming - Winter 2012 Lab 1 - Introduction to Pelles C Objective To become familiar with the

More information

5/10/2009. Introduction. The light-saber is a Jedi s weapon not as clumsy or random as a blaster.

5/10/2009. Introduction. The light-saber is a Jedi s weapon not as clumsy or random as a blaster. The Hacking Protocols and The Hackers Sword The light-saber is a Jedi s weapon not as clumsy or random as a blaster. Obi-Wan Kenobi, Star Wars: Episode IV Slide 2 Introduction Why are firewalls basically

More information

Web Forms ASP.NET. 2/12/2018 EC512 - Prof. Skinner 1

Web Forms ASP.NET. 2/12/2018 EC512 - Prof. Skinner 1 Web Forms ASP.NET 2/12/2018 EC512 - Prof. Skinner 1 Active Server Pages (.asp) Used before ASP.NET and may still be in use. Merges the HTML with scripting on the server. Easier than CGI. Performance is

More information

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted)

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted) A QUICK GUIDE TO PROGRAMMING FOR THE WEB TO GET ACCESS TO THE SERVER: ssh Secure- Shell. A command- line program that allows you to log in to a server and access your files there as you would on your own

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

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

Building Web Based Application using HTML

Building Web Based Application using HTML Introduction to Hypertext Building Web Based Application using HTML HTML: Hypertext Markup Language Hypertext links within and among Web documents connect one document to another Origins of HTML HTML is

More information

A Simple Way to Make Passwords More Effective

A Simple Way to Make Passwords More Effective A Simple Way to Make Passwords More Effective J. Scott Magruder The University of Southern Mississippi 601-266-5099/Fax 601-266-4642 James.Magruder@usm.edu Stanley X. Lewis, Jr. The University of Southern

More information

Dreamweaver Basics Outline

Dreamweaver Basics Outline Dreamweaver Basics Outline The Interface Toolbar Status Bar Property Inspector Insert Toolbar Right Palette Modify Page Properties File Structure Define Site Building Our Webpage Working with Tables Working

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Learn about the Document Object Model and the Document Object Model hierarchy Create and use the properties, methods and event

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

PRINCIPLES OF OPERATING SYSTEMS

PRINCIPLES OF OPERATING SYSTEMS PRINCIPLES OF OPERATING SYSTEMS Tutorial-1&2: C Review CPSC 457, Spring 2015 May 20-21, 2015 Department of Computer Science, University of Calgary Connecting to your VM Open a terminal (in your linux machine)

More information

Using Dreamweaver CC. 5 More Page Editing. Bulleted and Numbered Lists

Using Dreamweaver CC. 5 More Page Editing. Bulleted and Numbered Lists Using Dreamweaver CC 5 By now, you should have a functional template, with one simple page based on that template. For the remaining pages, we ll create each page based on the template and then save each

More information

CHAPTER 7 WEB SERVERS AND WEB BROWSERS

CHAPTER 7 WEB SERVERS AND WEB BROWSERS CHAPTER 7 WEB SERVERS AND WEB BROWSERS Browser INTRODUCTION A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information

More information

Lecture (03) from static HTML to

Lecture (03) from static HTML to Lecture (03) from static HTML to dynamic CGI By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2016, Web Programming Forms Forms add the ability to web pages to not only provide the person viewing

More information

Week 3 Lecture 2. Types Constants and Variables

Week 3 Lecture 2. Types Constants and Variables Lecture 2 Types Constants and Variables Types Computers store bits: strings of 0s and 1s Types define how bits are interpreted They can be integers (whole numbers): 1, 2, 3 They can be characters 'a',

More information

Creating Web Pages Using HTML

Creating Web Pages Using HTML Creating Web Pages Using HTML HTML Commands Commands are called tags Each tag is surrounded by Some tags need ending tags containing / Tags are not case sensitive, but for future compatibility, use

More information

Café Soylent Green Chapter 12

Café Soylent Green Chapter 12 Café Soylent Green Chapter 12 This version is for those students who are using Dreamweaver CS6. You will be completing the Forms Tutorial from your textbook, Chapter 12 however, you will be skipping quite

More information

COP Programming Concepts Spring 1999 CLOSED BOOK Exam #1 100 Points NAME

COP Programming Concepts Spring 1999 CLOSED BOOK Exam #1 100 Points NAME CLOSED BOOK Exam #1 100 Points NAME 1. The following program has (at least) 10 syntax errors. Circle each error. Write the corrected program in the blank space below. 2 points for each error you find.

More information

This%is%CS50.% Harvard*University*Fall%2012* Quiz*1* out*of*121*points* Name* * * * * * * * * * * % % Harvard*ID*number* * * * * * * * * %

This%is%CS50.% Harvard*University*Fall%2012* Quiz*1* out*of*121*points* Name* * * * * * * * * * * % % Harvard*ID*number* * * * * * * * * % ThisisCS50. HarvardUniversityFall2012 Quiz1 outof121points Donotturnthispageoveruntiltoldbythestafftodoso. Thisquizis"closed@book."However,youmayutilizeduringthequizonetwo@sided page(8.5" 11")ofnotes,typedorwritten,andapenorpencil,nothingelse.

More information

CS4604 Prakash Spring 2016! Project 3, HTML and PHP. By Sorour Amiri and Shamimul Hasan April 20 th, 2016

CS4604 Prakash Spring 2016! Project 3, HTML and PHP. By Sorour Amiri and Shamimul Hasan April 20 th, 2016 CS4604 Prakash Spring 2016! Project 3, HTML and PHP By Sorour Amiri and Shamimul Hasan April 20 th, 2016 Project 3 Outline 1. A nice web interface to your database. (HTML) 2. Connect to database, issue,

More information

Website Administration Manual, Part One

Website Administration Manual, Part One Website Administration Manual, Part One A Guide to the CMS & Widgets Curry School of Education Website http://curry.virginia.edu The Curry Website Administrators Manual - Part One 2 The CMS The content

More information

OptimiData. JPEG2000 Software Development Kit for C/C++ Reference Manual. Version 1.6. from

OptimiData. JPEG2000 Software Development Kit for C/C++  Reference Manual. Version 1.6. from OptimiData for optimized data handling JPEG2000 Software Development Kit for C/C++ Reference Manual Version 1.6 from 2004-07-29 (Windows and Linux Versions) www.optimidata.com OptimiData JPEG2000 C-SDK

More information

Lecture 10: Working with Files. CS 383 Web Development II Monday, March 12, 2018

Lecture 10: Working with Files. CS 383 Web Development II Monday, March 12, 2018 Lecture 10: Working with Files CS 383 Web Development II Monday, March 12, 2018 Working with Files Last week, we began to do some work with files through uploads, and we talked a little bit about headers

More information

MAKING MAPS WITH GOOGLE FUSION TABLES. (Data for this tutorial at

MAKING MAPS WITH GOOGLE FUSION TABLES. (Data for this tutorial at MAKING MAPS WITH GOOGLE FUSION TABLES (Data for this tutorial at www.peteraldhous.com/data) Thanks to Google Fusion Tables, creating maps from data and embedding them on a web page is now easy. We re going

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

Week 5, continued. This is CS50. Harvard University. Fall Cheng Gong

Week 5, continued. This is CS50. Harvard University. Fall Cheng Gong This is CS50. Harvard University. Fall 2014. Cheng Gong Table of Contents News... 1 Buffer Overflow... 1 Malloc... 6 Linked Lists... 7 Searching... 13 Inserting... 16 Removing... 19 News Good news everyone!

More information

CSE 1320 INTERMEDIATE PROGRAMMING - OVERVIEW AND DATA TYPES

CSE 1320 INTERMEDIATE PROGRAMMING - OVERVIEW AND DATA TYPES CSE 1320 INTERMEDIATE PROGRAMMING - OVERVIEW AND DATA TYPES Mingon Kang The University of Texas at Arlington C History ANSI C, also known C89(ANSI X3.159-1989) and C90 (ISO/IEC 9899:1990) ANSI: American

More information

HTML Forms. By Jaroslav Mohapl

HTML Forms. By Jaroslav Mohapl HTML Forms By Jaroslav Mohapl Abstract How to write an HTML form, create control buttons, a text input and a text area. How to input data from a list of items, a drop down list, and a list box. Simply

More information

External HTML E-form Guide

External HTML E-form Guide External HTML E-form Guide A guide for creation and setup of external e- froms for FileBound. Document Version: 6.5.2 Published Date: 2/27/2014 - 2 - Copyright Copyright 2013 FileBound All Rights Reserved.

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

Seema Sirpal Delhi University Computer Centre

Seema Sirpal Delhi University Computer Centre Getting Started on HTML & Web page Design Seema Sirpal Delhi University Computer Centre How to plan a web development project draft a design document convert text to HTML use Frontpage to create web pages

More information

ENCM 339 Fall 2017 Tutorial for Week 8

ENCM 339 Fall 2017 Tutorial for Week 8 ENCM 339 Fall 2017 Tutorial for Week 8 for section T01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 2 November, 2017 ENCM 339 T01 Tutorial

More information

By completing this practical, the students will learn how to accomplish the following tasks:

By completing this practical, the students will learn how to accomplish the following tasks: By completing this practical, the students will learn how to accomplish the following tasks: Learn different ways by which styles that enable you to customize HTML elements and precisely control the formatting

More information

Security issues. Unit 27 Web Server Scripting Extended Diploma in ICT 2016 Lecture: Phil Smith

Security issues. Unit 27 Web Server Scripting Extended Diploma in ICT 2016 Lecture: Phil Smith Security issues Unit 27 Web Server Scripting Extended Diploma in ICT 2016 Lecture: Phil Smith Criteria D3 D3 Recommend ways to improve web security when using web server scripting Clean browser input Don

More information

1 Form Basics CSC309

1 Form Basics CSC309 1 Form Basics Web Data 2! Most interesting web pages revolve around data! examples: Google, IMDB, Digg, Facebook, YouTube! can take many formats: text, HTML, XML, multimedia! Many of them allow us to access

More information

CST272 Getting Started Page 1

CST272 Getting Started Page 1 CST272 Getting Started Page 1 1 2 3 5 6 8 10 Introduction to ASP.NET and C# CST272 ASP.NET ASP.NET Server Controls (Page 1) Server controls can be Buttons, TextBoxes, etc. In the source code, ASP.NET controls

More information

HTML 5 Form Processing

HTML 5 Form Processing HTML 5 Form Processing In this session we will explore the way that data is passed from an HTML 5 form to a form processor and back again. We are going to start by looking at the functionality of part

More information

Locate your Advanced Tools and Applications

Locate your Advanced Tools and Applications MySQL Manager is a web based MySQL client that allows you to create and manipulate a maximum of two MySQL databases. MySQL Manager is designed for advanced users.. 1 Contents Locate your Advanced Tools

More information

This document explains how to obtain a direct link from within an existing Facebook page to the hotel s booking

This document explains how to obtain a direct link from within an existing Facebook page to the hotel s booking How to link Facebook with the WuBook Booking Engine! This document explains how to obtain a direct link from within an existing Facebook page to the hotel s booking engine page at WuBook via the WuBook

More information

Chapter 9. Managing State Information. Understanding State Information (continued) Understanding State Information 10/29/2011.

Chapter 9. Managing State Information. Understanding State Information (continued) Understanding State Information 10/29/2011. Chapter 9 Managing State Information PHP Programming with MySQL 2 nd Edition Objectives In this chapter, you will: Learn about state information Use hidden form fields to save state information Use query

More information

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010 CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011 Lectures 1-22 Moaaz Siddiq Asad Ali Latest Mcqs MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please

More information

FIT 100: Fluency with Information Technology

FIT 100: Fluency with Information Technology FIT 100: Fluency with Information Technology Lab 1: UW NetID, Email, Activating Student Web Pages Table of Contents: Obtain a UW Net ID (your email / web page identity):... 1 1. Setting Up An Account...

More information

CS 61c: Great Ideas in Computer Architecture

CS 61c: Great Ideas in Computer Architecture Arrays, Strings, and Some More Pointers June 24, 2014 Review of Last Lecture C Basics Variables, functioss, control flow, types, structs Only 0 and NULL evaluate to false Pointers hold addresses Address

More information

IEEM 230. PHP Basics, Part IV. Objectives of the lab:

IEEM 230. PHP Basics, Part IV. Objectives of the lab: IEEM 230. PHP Basics, Part IV Objectives of the lab: Learn the fundamentals of PHP - different types of data inputs using web FORMS - I/O from files - more PHP practice Standard PHP reference website:

More information

VERSION GROUPWISE WEBACCESS USER'S GUIDE

VERSION GROUPWISE WEBACCESS USER'S GUIDE VERSION GROUPWISE WEBACCESS USER'S GUIDE TM Novell, Inc. makes no representations or warranties with respect to the contents or use of this manual, and specifically disclaims any express or implied warranties

More information

Data Types. Every program uses data, either explicitly or implicitly to arrive at a result.

Data Types. Every program uses data, either explicitly or implicitly to arrive at a result. Every program uses data, either explicitly or implicitly to arrive at a result. Data in a program is collected into data structures, and is manipulated by algorithms. Algorithms + Data Structures = Programs

More information

About Netscape Composer

About Netscape Composer An About Netscape Composer The pictures and directions in this handout are for Netscape Composer that comes with the Netscape Communicator 4.7 package available for free from Netscape s web site at http://www.netscape.com.

More information

C Tutorial: Part 1. Dr. Charalampos C. Tsimenidis. Newcastle University School of Electrical and Electronic Engineering.

C Tutorial: Part 1. Dr. Charalampos C. Tsimenidis. Newcastle University School of Electrical and Electronic Engineering. C Tutorial: Part 1 Dr. Charalampos C. Tsimenidis Newcastle University School of Electrical and Electronic Engineering September 2013 Why C? Small (32 keywords) Stable Existing code base Fast Low-level

More information

A LCD display with ethernet interface

A LCD display with ethernet interface Home Electronics Graphics, Film & Animation E-cards Other Linux stuff Photos Online-Shop Content: Why a LCD display? The circuit The web interface URL-decoding and other building blocks Control via scripts

More information

Interlink Express Desktop Printing Service Installation Guide

Interlink Express Desktop Printing Service Installation Guide Interlink Express Desktop Printing Service Installation Guide Page 1 of 10 Introduction This guide is intended to provide guidance on how to install and configure the new Interlink Express Desktop Printing

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

SocialMiner Configuration

SocialMiner Configuration This section outlines the initial setup that must be performed when SocialMiner is first installed as well as the ongoing user-configurable options that can be used once the system is up and running. The

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

icc.edu/library Films on Demand Guide for Faculty and Staff

icc.edu/library Films on Demand Guide for Faculty and Staff icc.edu/library Films on Demand Guide for Faculty and Staff Finding Films on Demand on the Library website: From the homepage of ICC Library website locate the Library Collections menu and click on Streaming

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

Pointers. A pointer is simply a reference to a variable/object. Compilers automatically generate code to store/retrieve variables from memory

Pointers. A pointer is simply a reference to a variable/object. Compilers automatically generate code to store/retrieve variables from memory Pointers A pointer is simply a reference to a variable/object Compilers automatically generate code to store/retrieve variables from memory It is automatically generating internal pointers We don t have

More information

Using Dreamweaver. 5 More Page Editing. Bulleted and Numbered Lists

Using Dreamweaver. 5 More Page Editing. Bulleted and Numbered Lists Using Dreamweaver 5 By now, you should have a functional template, with one simple page based on that template. For the remaining pages, we ll create each page based on the template and then save each

More information

Quiz 0 Review Session. October 13th, 2014

Quiz 0 Review Session. October 13th, 2014 Quiz 0 Review Session October 13th, 2014 Topics (non-exhaustive) Binary. ASCII. Algorithms. Pseudocode. Source code. Compiler. Object code. Scratch. Statements. Boolean expressions. Conditions. Loops.

More information