COMP-3077-91

Web Based Database Systems

Winter-2021

ASSIGNMENT-2


Submission Deadline February 25th , 2021 by midnight.


Instructions for Submission:

• You will execute the results of each question (use any online editor) and prepare a word or pdf file to put screen shots of your answers/code along with results.

• You also have to upload your code in a zip file on the black board.

Make sure that your report contains your name and id


1) Pre-requisites:

      For this assignment, at least read the section on HTML, HTML Forms, Javascript, PHP and SQL on w3shools. Link( https://www.w3schools.com/)


2) Objective:

You will learn:

To apply different control functions on your HTML forms using Javascript


Note: For this assignment , you will continue with the same forms that you created in Assignment-1 in Task-1


Task-1: Use of Javascript      (10 Marks)

      You are required to perform the following checks (validations)on your designed form in Task 1(sign up form )from Assignment-1


1. First Name and Last fields should not have less than four (4) characters as input.

2. Names (First and Last) should only consist of text input (no special characters, symbols or numeric input allowed). An error message should pop up if input is in incorrect format.

3. Email should be entered in proper format. e.g it should include @ and .com

4. Phone number should be entered in the format (xxx)-(xxx)-(xxxx) and by default the format appears (greyed out) in the text box.

5. Password should be at least 8 characters in length and :

i) Must have atleast one upper and one lower case character

ii) Must have atleast one digit

iii) Must have one special character such as @, $ etc

iv) These instructions to be displayed on the left of the box, so user knows what type of password to be created.

6. Password and confirm password MUST match with each other.

7. If any of the fields is left BLANK (not filled) by the user, an warning message should show up, asking the user to fill in the required field.


If the user enters any wrong type of input, an alert should be displayed showing what correct input is required.

All field must have an (*) next to them showing that they are mandatory to be filled.

Try to display a brief note in front of the files about what type of input is required. For example , next to password field , you can display message “minimum 8 characters in length with upper and lower case, digit and a special character”