Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PHP with MySQL Database lab session Goal: Develop a website to share public and private status. The database is called school with two tables called
PHP with MySQL Database lab session
Goal:
Develop a website to share public and private status.
The database is called school with two tables called professor as we did the last time where
SSN is the primary key.
users user email:varchar, password:varchar
status statusid:int auto increment, statustext:varchar, statusprivacy:int,
useremail:varchar
Users can post statuses. An instance of the tables is shown below.
Part : the index page:
It shows a form that will be used for login by taking the user to a page called loggingphp when
the submit button is pressed.
It also shows the statuses who are public only.
If no public statuses have been added yet, it shows the sentence no public statuses to show.
Please log in
University of the Fraser Valley is located on the unceded territory of the St:l peoples. We gratefully
acknowledge our privilege to live and work on these unceded lands.
Part : The Logging.php page
This page is reached when the user clicks on the submit button of the form in the index page.
This page has three jobs:
checks if the email doesnt exist. In that case, it creates an account for the user using the
email in the session and password provided in the form. After that, initialize a session,
saving the email and a field called isloggedin and redirects the user to home.php
if the email exists but the password is wrong, the user is redirected back to index.php
checks if the email exists. In that case, check if the password is correct and after that,
initialize a session, saving the email in the session and a field called isloggedin and
redirects the user to home.php
University of the Fraser Valley is located on the unceded territory of the St:l peoples. We gratefully
acknowledge our privilege to live and work on these unceded lands.
Part : The home page
The homepage is made of three parts:
Part A: A welcome message and a logout button
Part B: A form for the user to add a status. This form has an input field, a
checkbox and the submit button.
Part C: the timeline. A list of all statuses public and private
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