Page 1 of 1

PLEASE HELP OUT IF YOU CAN AND KNOW HTML AND PHP AS AN EXPECT AND IF YOU CANT PLEASE DONT COMMENT. HTML & php (please pa

Posted: Sat May 14, 2022 6:51 pm
by answerhappygod
PLEASE HELP OUT IF YOU CAN AND KNOW HTML AND PHP AS AN
EXPECT AND IF YOU CANT PLEASE DONT COMMENT.
HTML & php (please paste the source code or attach a google
link to access the work) Part 2 — Prototype (Marks: 100) For this
Part, you will need to build a fully working web application
prototype. This prototype will include all the features listed in
the instructions section of this document but based on your own
design and user interface layout.. Create a database using
PHPMyAdmin, name the database bookstore. The database may consist
of the following tables: • tblUser • tblAdmin • tblAorder •
tblBooks. Simplify the design by analysing the relationships among
the tables. Ensure that you create the necessary primary keys and
foreign keys coding the constraints as dictated by the ERD design.
Create a connection to the bookstore database: • Create a text file
userData.txt and populate the text file with at least five
fictitious entries, e.g., John Doe [email protected]
29ef52e7563626a96cea7f4b4085c124. • Use the console or phpMyAdmin
and load the text file manually into the table. • The code that
creates the connection must be saved in a file called DBConn.php. •
Create a script called createTable.php that will check if the
tblUser exists and if it does, delete the table and (re)create the
table and load the data into the table using userData.txt file as a
source file. • Embed the DBConn.php as an include file within the
createTable.php script. • Each time the script is executed the
table will be deleted if it exists and reloaded with the data
stored in the textfile. Create a login page for your web
application. The login page must: • Accept a username, student
number and a password. • The password must be compared to a hash
(e.g., 29ef52e7563626a96cea7f4b4085c124) in the tblUser table. •
When clicking the submit button, use HTML5 for validation.
Textboxes and the password from the login details must be compared
to the stored hashed password value in the MySQL database. • If the
validation confirms that the password is valid, then display the
user’s data using an associative read approach regarding the column
names in a table. However, if the password is incorrect, then use a
sticky form and redisplay the details entered allowing the user to
edit the fields instead of re-typing all the fields. Display a
string at the top of the page that identifies the user and reads:
“User John Doe is logged in”. • If the user does not exist, they
can register themselves and create the hash and login. Once a user
is registered Librarians need to verify if the user is a student. A
user won’t be able to login instantly, unless verified as a
student. New user registration would be pending until verification.
Create a login page for the admin: • When the user clicks the
“Admin” button, the user must be prompted to login with
administrator rights, unless the user with those rights is already
logged in. • Verify new registrations and check if they are
students. • The admin user should be able to add, update and delete
books. Export your structure of each table to a Word file as part
of your POE documentation. 6. Create a text file for data on each
base table and populate the text file with at least five fictitious
entries for each base table. Use the console or phpMyAdmin and load
the text file (data) manually into each base table. Export the
database structure to a text file called myBookstore.sql with the
DDL statements so the lecturer can use the sql-text file to create
your database with 30 entries for each base table Create a script
loadBookStore.php that will create the tables within the bookstore
database. Ensure that all tables are dropped before creating them
and that a table is created only if it does not exist. Use mysqli
or improved mysql to create your connection in an include file.
Hint: Export your database to an SQL file and use the exported code
in association with PHP code. NB NB NB The user must be able to
register using the application. This registration information must
be stored in a MySQL database. • The user must be able to login to
the application using their username and password. • All
registration fields must be required fields, cannot be left be a
blank field when the user registers on the application. • Display
the librarian/admin verifying the user as a student and finally
allowing the user to login. • Also show the code associated with
the above functionalities.