Answered step by step
Verified Expert Solution
Question
1 Approved Answer
create the following folder structure in your htdocs folder ( or the csis 2 4 4 0 folder, if you created one, in your htdocs
create the following folder structure in your htdocs folder or the csis folder, if you created one, in your htdocs folder
session
Inside of the session folder, copy all of the files and folders from your insecure folder from the Insecure Passwords assignment
Run this new web site localhostsession and test it ensuring that it runs exactly as the Insecure Passwords assignment
Modify the code to include the following new components:
Log in Persistence
Log out Button Link
Home Button Link
Log in Persistence:
When the user logs in create a session variable
If the user goes to the Home link and the session variable exists then the data from the text file will still display
If the user goes to the Home link and the session variable is not set, the log in form will display
Log out Button:
Clicking the log out button will destroy the session and redirect to the index.php page.
Upon loading index.php the log in form should appear
Home Button:
Clicking this button simply goes to index.php the page you're already on since this site only has one page other than the log out page
If the log in session was created then the page will show the txt file info. If the session is not set, the log in form shows.
Advanced Content
In the real world, a real programmer has to be good at researching online. The Advanced Content section is meant to prepare you for that. Below is a list of a few items that purposely aren't fully or at all covered in the lectures videos. The intent is to get you used to the idea of taking what you know and branching out through a little bit of research online, just like in the real, postschool, world. :
Use the PHP documentation
Links to an external site. and as a secondary source WSchools
Links to an external site..
Correctly implement the following items on your page:
Create another page and a link to it in the navigation. The page contains a YouTube video of your choosing.
It only displays if the log in session is active, otherwise it redirects to the home log in page.
Create an "account" page and a link to it in the navigation that shows the logged in user's name and image.
Note: Store the image path in the users database in a new field called image
This page only displays if the login session is active, otherwise, it redirects to the home log in page.
Create another page and a link to it in the navigation. The page contains an EMBEDDED YouTube video of your choosing.
It only displays if the log in session is active, otherwise it redirects to the home log in page.
Create an "account" page and a link to it in the navigation that shows the logged in user's name and image.
Note: Store the image path in the users database in a new field called image
This page only displays if the login session is active, otherwise, it redirects to the home log in page.
The image must be unique for each user.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started