Part 4 Processing and saving data with CGI/Perl Psychological Science on the Internet: Designing Web-Based Experiments From the Ground Up R. Chris Fraley.

Slides:



Advertisements
Similar presentations
1. XP 2 * The Web is a collection of files that reside on computers, called Web servers. * Web servers are connected to each other through the Internet.
Advertisements

Outlook Contacts Export Guideline Powered by DonorCommunity TM DonorCommunity eLearning Series v1.2, September 2012 Outlook Contacts Export Guideline Outlook.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Creating basic HTML web pages R. Chris Fraley |
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Tutorial 6 Working with Web Forms
Gathering Requirements What do users want?. Information Gathering Techniques Surveys Interviews Focus Groups.
1 Computing for Todays Lecture 22 Yumei Huo Fall 2006.
Python and Web Programming
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Creating Web Page Forms
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
4-Sep-15 HTML Forms Mrs. Goins Web Design Class. Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information.
CO1552 Web Application Development HTML Forms. Websites can be made more interactive by providing facilities for users to provide data To get user entered.
Creating basic HTML web questionnaires R. Chris Fraley – Psych 437.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 24 How Websites Work with Databases How Websites Work with Databases.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Project Four Forms Discuss form processing Describe the difference between client-side and server-side form processing Add a horizontal rule to a Web page.
Let’s Make An Form! Bonney Armstrong GD 444 Westwood College February 9, 2005.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Creating a Web Site to Gather Data and Conduct Research.
What is Museum Box? A Museum box is a way of presenting information that allows you to create a cube project that can be shared with others. You can use.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
Web Design and Development for E-Business By Jensen J. Zhao Copyright 2003 Prentice Hall, Inc. Web Design and Development for E-Business Jensen J. Zhao.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
ASP Introduction Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Go to your school’s web locker site school name.schoolweblockers.com) Your user name is the first letter of your first name, the first 4.
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
RiskMeter Batch Training. Batch Tool The Riskmeter batch tool allows users to submit multiple locations all at once. The Riskmeter batch tool allows users.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
With Windows 7 Introductory© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 Windows 7 Introductory Chapter 3 Advanced File Management and Advanced.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
Concepts  messages are passed through the internet by using a protocol called simple mail transfer protocol.  The incoming messages are.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Introduction to JavaScript CS101 Introduction to Computing.
Connecting to the eTeacher FTP on Windows 7/Vista eTeacherGroup 2010.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
How do I export the Address Book to Excel? The first step is to go to "Address Book Report" under Admin Only menu Choose the fields you want. note that.
HTLM Forms CS3505. Form Handling in Browser html User Files out form WEbBROWSErWEbBROWSEr User read response submit Get URL?input html Get file html script.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Form Processing Week Four. Form Processing Concepts The principal tool used to process Web forms stored on UNIX servers is a CGI (Common Gateway Interface)
Part 5 Advanced topics in CGI/Perl Psychological Science on the Internet: Designing Web-Based Experiments From the Ground Up R. Chris Fraley | APS 2006.
PHP Form Processing * referenced from
University of Kansas Department of Electrical Engineering and Computer Science Dr. Susan Gauch April 21, 2005 I T T C Introduction to Web Technologies.
XP Creating Web Pages with Microsoft Office
Welcome to the ABC Bakers PowerPoint on Girls Selling Cookies Online with E-Cards. ABCSmartcookies.com is your Girl Scout’s all-in-one access to learn.
Tutorial 6 Working with Web Forms
Using the Personal Image Photo Library
How to create a web page using word …
Using the HTML and CSS Validation Services
Welcome to the ABC Bakers PowerPoint on Girls Selling Cookies Online with E-Cards. ABCSmartcookies.com is your Girl Scout’s all-in-one access to learn.
Microsoft FrontPage 2003 Illustrated Complete
Part 3 Creating basic HTML web pages
Part 2 Setting up a web server the easy way
Chapter 27 WWW and HTTP.
Module 1 Introduction to PHP 11/30/2018 CS346 PHP.
Part 2 Setting up a web server the easy way
Part 3 Creating basic HTML web pages
Chapter 6: Creating Web Page Forms. An Example of a Form.
Presentation transcript:

Part 4 Processing and saving data with CGI/Perl Psychological Science on the Internet: Designing Web-Based Experiments From the Ground Up R. Chris Fraley | APS 2005

Sending data to the server If you submit information from a form, there must be some place for that information to go. The tag of an HTML web page specifies where the information should be sent.

Sending data to the server More often than not, the information is sent to the server that delivered the web page to the user in the first place. The information is processed by a program/ script.

Scripting languages There are a number of scripting languages available for processing Internet data –Perl –PHP –C++ –ASP We will focus on using Perl for processing CGI data.

CGI/Perl CGI programs are what enables a dynamic experience for the web user. A CGI program might be used to do any of the following: –Provide the user with feedback based on his or her responses –Write data to a file –Read data from a file –Create scores based on information provided –Randomize things

What we need from a script that will process our self-esteem data The first script upon which we will focus will be designed to do four things: –1. Read the data that has been submitted by the user. –2. Use that information to compute the person’s self-esteem score. –3. Provide that score to the user, along with the average score in the sample to date. –4. Save the data to a file that can be imported into SPSS or Excel.

The code This is a lot for one script to do, so we’ll focus on one part at a time. You can view (and copy-and-paste) the “commented” Perl script at the following address: savedata.plhttp://web-research-design.net/APS2005/files/self-esteem- savedata.pl Note: This is the code per se; not the output of the code when it is executed. To use the code, paste it into a blank file, save it with the *.pl extension and place it in the cgi-bin directory of your Netfirms account.

The code [An extended discussion of what the various codes “do” for self-esteem-savedata.pl. Also, a discussion of how to customize the script for your own purposes.] The goal of this discussion is not to teach you what every piece of the code does. We don’t have time for that kind of detailed discussion. Instead, I want you to see what each section is designed to do so that you can modify it without too much work for your own purposes. Please see the Fraley (2004) book for more information on exactly how these Perl commands operate.

Transferring your Perl script to the web server Save your file with the *.pl extension. Example: myscript.pl Go to the Netfirms web page and login to your account. Go to the File Manager. Click the “cgi-bin” folder to open your cgi-bin directory (i.e., the directory where your Perl scripts will reside) Click the “upload” button. Find myscript.pl on your computer using the “browse” option. Upload the file.

Importing your data into SPSS or Excel The combination of the HTML program (self- esteem.htm) and the CGi/Perl program which processes and saves the data (i.e., self-esteem- savedata.pl) allows you to collect data, provide feedback to users, and save the data to the web server. The next step is to extract the data file from the web server and import it into your favorite stats package.

The self-etseem-savedata.pl script saves the data in a text-file called data.txt, located in a folder called “data” The first step is to get that file on to your computer. To do so, go to the File Manager of your Netfirms account.

Open your “www” folder and then open your “data” folder. Check the file called “self-esteem.txt” and then click the “download” icon to the right of that row. Download the file to a convenient place (e.g., the desktop) on your computer.

Import instructions for SPSS (version ) 1. Open SPSS 2. File -> Open -> Data 3. Under “files of type,” select “text (*.txt)” 4. Find your file and select it. Click open. 5. The “Text Import Wizard” will open. Follow each step and go with all of the defaults until you get to step 4 of 6. At that point, make sure that only the checkbox labeled “commas” in checked. 6. Continue on and press the “finish” button after step 6.

Step 2

Step 3. Chose the “Text” option under “Files of type”

Step 5. The “text import wizard” Step 5. Make sure that only the “comma” option is checked.

The imported file in SPSS. You can now label the variables in any way that you wish and/or analyze your data.

Import instructions for Excel 1. Open Excel 2. File -> Open 3. Under “files of type” choose “text.” 4. Find your file, select it, and press “open”. 5. This will begin a “text import wizard.” Choose the option that indicates that the data are in a “delimited” format. 6. In the next step of the wizard, make sure “comma” is the only delimiter option selected. 7. Press finish.

Step 2. Chose the “Text” option under “Files of type”

Step 5. The “text import wizard”. Choose the delimited option. Step 6. Choose only the comma option.

The imported file in Excel. You can now label the variables in any way that you wish and/or analyze your data.