Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 4 . Backend Debugging Question [ PLO S 1 / CLO 2 . 3 / SO 2 ] [ 6 points ] Question Please

Q 4. Backend Debugging Question [PLO S1/CLO 2.3/SO 2]
[6 points]
Question
Please review the provided JavaScript code. The purpose of this code is to process a user registration submission. It will read the information submitted from the form and do the following:
Setup static routing so that the page index.html is the first page to be displayed to the user when visiting the root URL and the port 8000.
Process form submission properly to read user input, validate it, and store in the database. - First: Setup HTML routing properly.
Second: Read user input submitted from the form properly.
Third: Check if usemame and password were submitted or not (usemame AND password must at least contain a single character)
Fourth: Create a new account with the specified username and password and store it in the database name "finalexam", table name "user", and as per the column names shown in the table schema below.
Fifth: Reply to the user with "Account created" if user data passed validation.
Sixth: Reply to the user with "Please complete the form" if the user data did NOT pass validation.
Welcome to the CCSW-321 Class Page!
Kindly fill the information below to register:
Usemamt
Password:
Rogister
= "viewport" content = "width=device-width, initial-scale=1.0"|>
head>
body>
(:p:)(:p:)= "I">Username: div>
>
label for ="'> Password:||>>>||> div >
g12= "I">Username: div>
>
label for ="'> Password:||>>>||> div >
g12>
label for ="'> Password:||>>>||> div >
g12
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions