Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PHP and HTMl class Write the login form Write a PHP file that will output a form containing 3 fields: username, password and Remember me!

PHP and HTMl class

Write the login form

Write a PHP file that will output a form containing 3 fields: username, password and Remember me! checkbox. Upon submission of the form, the code should check against MySQL table to see whether the username/password pair was correct. If so, display a welcome message and save a cookie that identifies the user to the server. On further visits to the page, the user should appear logged in, even if the browser has been closed; If not, display the message Invalid username or password followed by the same login form. Once again,there should only be one PHP file, and you should redirect to the same place after submitting. The output should be one of three options:

The login form.

The invalid message and the login form, if failed login.

The welcome message containing a Log Out button, if successful login.

When user clicks Log out button, remove the cookie so that the user is logged out. Clicking the button should redirect the user to the same page, which now shows a login form.

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

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions

Question

What lessons in OD contracting does this case represent?

Answered: 1 week ago

Question

Does the code suggest how long data is kept and who has access?

Answered: 1 week ago