Objectives:

Get exposure to PHP and GET and POST verbs and Session in PHP.

Description:

In this assignment, you will create a web application using PHP to do two things:

1. Handle GET and POST requests

2. Create a Login Page using Sessions.

You must style and theme your assignments.

You will lose points if your pages look bad/ugly.

Remember: Always put your name and a description in a block comment at the top of your code pages.

Part I: POST vs. GET

Create a web application that starts in a folder or subdomain on your domain that is similar to what I have done at the following website: http://teaching.jdholmes.net/postvget/ Though it will be similar, there will be a few exceptions.

Your code will do the following:

1. Have a form that accepts at least three visible fields and one hidden field.

a. Visible fields: i. First Name ii. Middle Name iii. Last Name

b. The hidden field’s value will be your name.

2. Provide data back to the server as either a POST or GET request.

a. You must provide both a POST and GET option.

b. This must be done using the same form.

i. Hint: use JavaScript to change between POST and GET.

3. On a separate page or the same page, handle the GET and POST request.

a. Inform the user where a GET or POST request was processed.

b. Display the content to the user

4. All POST and GET processing must be handled in PHP.

Part II: Sessions Your code needs to do the following:

1. Create a User object in a separate file.

2. Create an array of user objects in a separate file that contain the following users:

a. Johnny Test

i. username: tester ii. password: test

b. Sally Hooper

i. username: greater ii. password: tested

c. Arin Murrin

i. username: starter ii. password: westward

3. Create a login page with the following:

a. UserName b. Password c. Checkbox to remember username d. Login button e. Forget Me button

4. Checks for validation of the username and password using the array defined above.

i. If login is successful:

1. Redirect to another page using the session to pass the user object of the logged in user.

2. Display the name of the logged in user using the session to get the information.

a. Use the format LastName, FirstName (username).

ii. If not:

1. Inform the user it failed.

5. Have a way to log out that destroys the session from either page.

a. Redirect after login to a page showing that the username in the session has been cleared.

Note: you will need to include files as needed.

Looking for solution of this Assignment?

WHY CHOOSE US?

We deliver quality original papers

Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay