Question: You need to implement a web application that is split into three parts, namely, Webpage, PHP , and MySQL . Each of them will be

You need to implement a web application that is split into three parts, namely, Webpage, PHP, and MySQL. Each
of them will be used concurrently to solve the simple problem described below. Remember to implement the
logic in the most secure way of your knowledge.
Webpage
The user must be able to upload a text file (no other format). The text file will contains the sequence of
transactions for a user.
Users should be able to input a string via a text box. The string will represent the user's email. This email will
identify which user in the database and update their balance based on the sequence of transactions uploaded
through a text file.
The webpage shows the content of the database, that is, the balance of all users with their email
This should happen every time the page loads, even if the user has accessed the page for the first time
PHP
Implement a PHP function that reads in inputs as a string from the user and stores it in a table (in a field
called "Email")
The function should be able to read the content of the file, update the balance of the associated email and
store it in a table too (in a field called "Balance")
MySQL
You need to create a database, including at least one table for storing the emails and their associated balance.
While you don't need to submit SQL code like "SHOW DATABASE" or "CREATE TABLE," it's essential to
prepare the necessary queries, such as INSERT and SELECT, within your PHP application. Your web
application depends on these queries to function properly.
Some edge cases - Some suggestions:
What if the email doesn't exist in database? You should add it to database with initial balance of zero dollars
What if the file contain a string in between the transactions? You should inform the user by printing the
invalid transaction on the page, skip and resume the rest of the transactions.
Any more ...?
User upload file example:
100
-150
1000
ten thousands
-265.99
seven
You are required to submit your web application in the form of two or more .php files, and no other formats are accepted. In addition, you must include screenshots (or video recording) of your webpage to demonstrate the file uploading process and display the database content (the screenshots must show entire webpage) in a pdf file:
-One screenshot should depict two or more emails with their balance, with the user's input visible in a text box and an uploaded file. Please note that at this stage, the information is displayed as a placeholder in the text box, and the upload button has not been clicked yet (tl;dr, before clicking the upload button).
-Another screenshot should showcase the placeholder inputs being stored in the database and printed on the website. This occurs after the user has clicked the upload button and the data has been successfully processed (tl;dr, after clicking upload button).
You need to implement a web application that is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!