PHP代写 | Awkl 2020-03-11 web application

本次PHP代写是完成简单的手机销售网站
Due Date: 25 March 2020
Objectives:
• To let students demonstrate their web application development skills.
• To show the student’s ability to process a web form using a database to store and retrieve the
data.
Application Description:
The web application to be developed will enable the customers to reserve the “SmartPhone 4517”.
The web application should be created using HTML, PHP and MySQL.
Submission:
• Submit the following in soft copy to Moodle by the deadline.
• The source code of the web application (with proper comments and documentation) in a zip
file which contains at least 3 PHP files (reserve.php, validateForm.php, admin.php) and a
word document to show the screen captures with some brief explanations. You can include
other files if necessary, but not the actual database.
• You must include your name and student number as a comment in each of the php files.
Functional Requirements:
• Create 3 files: reserve.php, validateForm.php and admin.php, plus other optional items
such as JavaScripts, CSS, images and HTML.
• The reserve.php page must have the followings:
o A title tag – specifies “Reserve and Pick Up” as the page title.
o An h1 tag – shows your company name and a string “Reserve and Pick Up” at the
top of the web page.
o Labels and fields for collecting customer inputs.
o A reset button to allow customer to reset all fields.
o A submit button – When a customer clicks on this button, the form is submitted to
validateForm.php with POST method.
o The pickup date must be later than the day on which the user fills out the form.
o You should not rely on the frontend checking. The PHP code must do its own
checking in the backend.
o Check for duplicates in mobile phone numbers in existing reservations.
• In validateForm.php, the user inputs will be validated. If any of the user inputs is invalid,
the user will be directed to reserve.php again to correct the inputs. If all of the user inputs
are valid, the following steps will take place.
o A MySQL connection is established to “localhost” with database name “SEHS4517”,
username “root”. The account root can either have no password or use the password
“hkcc1234”.
o A new record is inserted into the table named “reservation”.
o A successful message will be show to the user.
awkl 2020-03-11 Page 2
Database:
• The MySQL database is setup using the following MySQL commands in the MySQL
Command Line Client:
DROP DATABASE IF EXISTS SEHS4517;
CREATE DATABASE SEHS4517;
USE SEHS4517;
CREATE TABLE reservation (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
store INT NOT NULL,
model INT NOT NULL,
fname VARCHAR(20) NOT NULL,
lname VARCHAR(20) NOT NULL,
email VARCHAR(100) NOT NULL,
mobile VARCHAR(8) NOT NULL,
pickup DATE NOT NULL
) ENGINE=INNODB;
DESCRIBE reservation;
+ + + + + + +
| Field | Type | Null | Key | Default | Extra |
+ + + + + + +
| id | int(11) | NO | PRI | NULL | auto_increment |
| rtimestamp | int(11) | NO | | NULL | |
| store | int(11) | NO | | NULL | |
| model | int(11) | NO | | NULL | |
| fname | varchar(20) | NO | | NULL | |
| lname | varchar(20) | NO | | NULL | |
| email | varchar(100) | NO | | NULL | |
| mobile | varchar(8) | NO | | NULL | |
| pickup | date | NO | | NULL | |
+ + + + + + +
9 rows in set (0.02 sec)
• The user inputs in reserve.php contain the following fields:
Field Name Description and Requirement
store A list which allows the customer to select the store for picking-up the
product:
1: IFC Mall
2: Festival Walk
3. Hysan Place
4: APM
model A list which allows the customer to select a particular model:
1: 16GB
2: 32GB
3: 64GB
4: 128GB
fname The first name of customer. Number of characters in this field must be
larger than 1 and less than 20. Name can only include A-Z, a-z and space
characters.
lname The last name of customer. Number of characters in this field must be
larger than 1 and less than 20. Name can only include A-Z, a-z and space
characters.
email The email address of customer. This field must be a valid email address.
rtimestamp INT NOT NULL,
awkl 2020-03-11 Page 3
mobile The phone number of customer. Number of characters in this field must
be equal to 8. This field can only include 0-9 characters.
pickup The date on which the customer will pick up the phone at the store.
• In validateForm.php, it must check that the user has input ALL the fields and ALL the
fields are valid according to the above table. If any of the fields is missing or invalid, the
user will be re-directed to reserve.php again to correct the form.
• The admin.php page is the administrative page for the smartphone company.
• The admin.php page shows a login form for the user to login, the login name of this page
should be admin. Password should be pass.
• After the login, the administrative page should provide the following functions:
o Show Check the list of reservation sorted by id.
o (Extra marks) Sort the list by reserve time pickup date, first name, or last name of the
customers. That is, three different ways to show the list in sorted format.
o Search records by mobile number of the customers
Marking Criteria:
• Functionalities
• User interface design
• Code Readability – indentation, comments
• Documentation
o Screen captures, explanations code segments for input validation
Sample (Not all the requirements are shown)
• The content of the terms in reserve.php:
• Due to the strong demand, SmartPhone 4517 only accept a limited number of reservations.
If you want to order the SmartPhone 4517, select retail stores and SmartPhone 4517 models.
If, your SmartPhone 4517 booking application is successful, you will receive a unique
reservation number. Please note the reservation number and present it to the staff when you
pick up your SmartPhone 4517 at your selected store.
• If you do not receive a unique reservation number, it means the order fails. Only the
customers who receive an email can buy the SmartPhone 4517 at the stores. You can apply
for booking the SmartPhone 4517 every weekday from 09:00 to 17:00. Please try again
later to submit a reservation.
awkl 2020-03-11 Page 4
• The sample layout of reserve.php. You should have your own design.
*** The End ***


程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: [email protected]  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

发表评论