Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a PHP function checkPass that takes two arguments: $user and $password and returns the UserID if the password matches the MD5 encoding of the

Write a PHP function "checkPass" that takes two arguments: $user and $password and returns the UserID if the password matches the MD5 encoding of the appropriate password in the interview_user_info table below and -1 otherwise.

The $user variable contains the NetID of the individual; the $password variable contains a clear-text version of the password as submitted.

+---------------------------------------------------------------------------------+ | interview_user_info | +-----------+-------------+-----------+--------+----------------------------------+ | UserID | LastName | FirstName | NetID | Passwd | +-----------+-------------+-----------+--------+----------------------------------+ | 469562029 | Gonzalez | Shauntee | sgonz | 530b4a0ae65148d112537bc0eafba9c9 | | 702930431 | Bates | Austin | abates | 9cdfb439c7876e703e307864c9167a15 | +-----------+-------------+-----------+--------+----------------------------------+ 

The connection and database selection are taken care of. Write the query to pull data from the table "interview_user_info", and return the result. The connection will be closed for you.

Hint: You will likely need to make use of the following functions and possibly others: md5, mysql_query, mysql_fetch_assoc

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

Students also viewed these Databases questions

Question

Which of the following are considered temporary storage

Answered: 1 week ago

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

What are the objectives of job evaluation ?

Answered: 1 week ago