Answered step by step
Verified Expert Solution
Link Copied!

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 (status_id:int auto increment, status_text:varchar, status_privacy:int,
user_email:varchar)
Users can post statuses. An instance of the tables is shown below.
Part 1: the index page:
It shows a form that will be used for login by taking the user to a page called logging.php 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.
2
Part 2: 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=1 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=1 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.
3
Part 3: 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

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions