Question: Goal: To handle a client POST request generated with an AJAX call on the client page to send login credentials to the server and return

Goal: To handle a client POST request generated with an AJAX call on the client page to send login credentials to the server and return a response of success of fail.

Steps:

  1. Write a CGI script (in any language you want) to parse a POST request from a client
  2. Generate a POST request from javascript that runs when the login button is press. Send this POST to the cgi page on the server
  3. With the username and pass variables from the POST request, read in a csv file with credentials (named creds)
  4. Check to see if the POST variables match the data from the csv file and return the appropriate response

Copy and paste your CGI script in the text area for this assignment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!