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

Similar documents
Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc.

Spring 2014 Interim. HTML forms

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity

HTML Forms. By Jaroslav Mohapl

ITS331 IT Laboratory I: (Laboratory #11) Session Handling

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013

Creating and Building Websites

CSE 154 LECTURE 8: FORMS

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

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

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data"

Forms, CGI. Objectives

Summary 4/5. (contains info about the html)

How to Set Up a Custom Challenge Page for Authentication

HTML Forms IT WS I - Lecture 11

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics

COMS 359: Interactive Media

HTML forms and the dynamic web

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

Row and Column Spans. Homework. Column and Row Span Example (2) Column and Row Span Example. tables: Live Demo. like the following using forms:

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI

cwhois Manual Copyright Vibralogix. All rights reserved.

CSC Web Technologies, Spring HTML Review

Networking and Internet

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Forms, CGI. HTML forms. Form example. Form example...

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

1 Form Basics CSC309

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

Forms, CGI. Cristian Bogdan 2D2052 / 2D1335 F5 1

CHAPTER 6: CREATING A WEB FORM CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY)

Developing Ajax Applications using EWD and Python. Tutorial: Part 2

Lecture (03) from static HTML to

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

HTML Form. Kanida Sinmai

HTML: Fragments, Frames, and Forms. Overview

6Lesson 6: Web Forms Objectives

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

Hyperlinks, Tables, Forms and Frameworks

Building Web Based Application using HTML

HTML crashcourse. general structure tables forms textfield textarea selectbox listbox hidden field checkbox radiobuttons submit button

Installation & Configuration Guide Version 3.1

SMS GATEWAY API INTEGRATION GUIDE

DAY 2. Creating Forms

UNIT-VI CREATING AND USING FORMS

Oracle Eloqua HIPAA Advanced Data Security Add-on Cloud Service

Lecture 9. Forms & APIs 1 / 38

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL

Jquery Ajax Json Php Mysql Data Entry Example

Web Technologies - by G. Sreenivasulu Handout - 1 UNIT - I

Client Side Scripting. The Bookshop

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

core programming HTML Forms Sending Data to Server-Side Programs Marty Hall, Larry Brown

Dreamweaver Forms Outline

Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code.

Web Application Development (WAD) V th Sem BBAITM (Unit 4) By: Binit Patel

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

SYBMM ADVANCED COMPUTERS QUESTION BANK 2013

Chapter 4 Sending Data to Your Application

Web Site Design and Development Lecture 23. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/

Technical Guide Login Page Customization

chapter 7 Interacting with Users Tell me and I will forget. Show me and I will remember. Involve me and I will understand.

Advanced HTML 5.1 INTRODUCTION 5.2 OBJECTIVES

Collecting Information with Forms

Should you encounter any issues or have questions as you go through this registration process, please send an to:

Creating Forms. Speaker: Ray Ryon

The figure below shows the Dreamweaver Interface.

WEBD 236 Web Information Systems Programming

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS

D B M G. Introduction to databases. Web programming: the HTML language. Web programming. The HTML Politecnico di Torino 1

CSS Review. Objec(ves. Iden(fy the Errors. Fixed CSS. CSS Organiza(on

HTML and JavaScript: Forms and Validation

Web Design and Development ACS Chapter 13. Using Forms 11/27/2018 1

Managing Web Authentication

jquery - Other Selectors In jquery the selectors are defined inside the $(" ") jquery wrapper also you have to use single quotes jquery wrapper.

Chapter 3 HTML Multimedia and Inputs

HTML 5 Tables and Forms

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

TM-800/1000 and TS-700/900 Administrator Manual

NETB 329 Lecture 13 Python CGI Programming

Dreamweaver: Web Forms

Lecture 5 Security and User Input. INLS 760 Web Databases Spring 2013 Rob Capra

Web Focused Programming With PHP

EXPERIMENT OBJECTIVE:

Jquery Manually Set Checkbox Checked Or Not

Information Technology Practicals related General Instructions

Web forms and CGI scripts

Introductory workshop on PHP-MySQL

External HTML E-form Guide

User Manual Appointment System

Web Forms. Survey or poll Contact us Sign up for an newsletter Register for an event

Dreamweaver MX The Basics

Web Application Security. Srikumar Venugopal Week 8, S2, 2014

CGI Programming. What is "CGI"?

Slybroadcast Global API Documentation Version 3.0 June 2018

Web technologies. Web. basic components. embellishments in browser. DOM (document object model)

Table of contents. DMXzone Ajax Form Manual DMXzone

Transcription:

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, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls Users "complete" a form by modifying its controls before submitting the form to an agent for processing

Obtain information from a web user Whole web page or part web page, but not a form in a form For this course, put form in html only, don t combine in one PHP. JavaScript (jquery) No need to save data in local machine

Secure data by encryption Cipher MD5(32), sha1(40), sha256(64) HTTPS (SSL) Cert RSA

hsbc.com, paypal.com gmail.com, mail.yahoo.com, hotmail.com, zaturday.com/webmail hkpl.gov.hk, edit.php.net

MD5 is considered cryptographically broken and is unsuitable for further use. The SHA1 algorithm might not be secure enough for ongoing use. It is recommended not to use SHA1. SHA224: SHA224 produces a 224-bit (28-byte) hash value, typically rendered as a hexadecimal number, 56 digits long. SHA256: SHA256 produces a 256-bit (32-byte) hash value, typically rendered as a hexadecimal number, 64 digits long.

SHA384: SHA384 produces a 384-bit (48-byte) hash value, typically rendered as a hexadecimal number, 96 digits long. SHA512: SHA512 produces a 512-bit (64-byte) hash value, typically rendered as a hexadecimal number, 128 digits long. RIPEMD160: RIPEMD160 produces a 160-bit (20-byte) hash value, typically rendered as a hexadecimal number, 40 digits long.

There are many different hash algorithms. So now PHP combine it in one hash() function. hash.php

Strong password PassPhase

PHP CGI (Perl) ASP / ASPX JSP Ruby Node.js Python Cold Fusion

Save data server side Database (MySQL)?name=ray&password=123

Usually used for collecting data Registration Login Search Guest book Research Vote

Text Fields Radio buttons Check boxes List/menus Buttons Hidden

You need form to get user information Insert -> Form -> Form <form></form>

If we do not know what is the availability of the result, we insert a textbox for user to input the data. EG. Username, Phone, etc.. <input name="username" type="text" id="username" size= 30" maxlength= 20" />

Since what we typed will be shown on the screen, so we better hide the characters. EG. Mail login, bank login. <input name="password" type="password" id="password" size= 30" maxlength= 20" />

Two types of controls that allow users to input text. INPUT element creates a single-line input control and the TEXTAREA element creates a multi-line input control. EG. Comments, Address, etc. <textarea name="comments" id="comments" rows="6" cols="40">default words </textarea>

They are on/off circle switches that can be toggled by the user They are mutually exclusive: when one is switched "on", all others with the same name are switched "off. Only one can be chosen. EG. Gender,Yes/No. <input type="radio" name="radio_group_name" value="button_value">

But why are they called radio buttons?! The reason is that they act as the radio buttons used in older car radios. When you pushed one, the dial moved. When you pushed another, the first choice was dropped and the dial moved again.

They are on/off square switches that may be toggled by the user. Only "on" checkbox controls can become successfully sent to server Allow users to select several values for the same property <input type="checkbox" name= checkbox_group_name" value="button_value">

Menus offer users options from which to choose where the choices are too long to display in a browser Two types of menus pull down menu, list menu Pull down menu select one from a drop list List menu select one or multiple items from a list menu. By pressing Ctrl key, you can select multiple selection

<select name="country" id="country"> <option selected="selected"> </option> <option value="hk">hong Kong</option> <option value="tw">taiwan</option> <option value="cn">china</option> <option value="kr">korea</option> <option value="jp">japan</option> <option value="mo">macau</option> </select>

Three types of buttons submit, reset, push Submit button - when activated, it submits a form Reset button - when activated, it resets all controls to their initial values Push button - each push button may have client-side scripts associated with the element's event attributes <input type="submit" name="submit" id="submit" value="submit" /> <input type="reset" name="reset" id="reset" value="reset" />

Controls that are not displayed but whose values are submitted with a form. Usually for the hidden information to sent back to server. <input name="from" id="from" type="hidden" value="web" />

To send the input data back to server, make sure have an action. <form action="file.php" method="post"> Make sure you end your page with this: </form>

You can add a table to tidy a form. Or use <dt>left</dt><dd>right</dd> + CSS Or use <div></div> + CSS

Let user input their date of birth from the web page. Create a new HTML file with a form Insert 3 text fields (Year, Month, Day). Name each field with the corresponding name. Insert a submit button and a reset button. Save as bday.html Set the form action to send to bday.php <form action="bday.php">

Download birthday.php Open birthday.php and save as bday.php All the results are stored in variables Change the constant variable to user s input $birthday= 20001231"; change to=> $bday = $_POST['year'].$_POST['month'].$_POST['day'];

In browser, open http://localhost/bday.html Testing it by input your date of birthday. Result will be displayed by bday.php

Get data is displayed in the location bar Get is used for requesting information, like a particular record from a database or the results of a search. Post usually handle large data Post is used when an action is required, as when a database record will be updated or email should be sent Post is usually used in login form <form method="post action="bday.php >

$username short form, not recommended in PHP4 since register_globals is turned off in /etc/php.ini $HTTP_GET_VARS["username"], $HTTP_POST_VARS["username"] $_GET["username"], $_POST["username"]

Try to write out a form in html for user to input a number Save as square.html Create a new php file Find the square of the number Save as square.php and test the page

Try to write out a form in html for user to input two numbers Save as multiple.html Create a new php file Find the product of the numbers Save as multiple.php and test the page

Find the bmi for yourself bmi = weight(kg)/height(m)/height(m) If I am 70kg and 1.74m, what is my bmi? <18.5 underweight, 18.5-25.0 normal, >25.0 overweight Write a form that can let user to input his/her height and weight See bmi.php

Create a form by Dreamweaver to collect username and password for login Send the information to the php Create a php page Test the html page Result can be seen by the php page login.html login.php

www.zaturday.com/homework/login.html Requirement 1. If username is blank, display "Please input your username". 2. If password is blank, display "Please input your password". 3. If password is wrong, display "wrong password". 4. If password is correct, display " welcome, username ".