0% found this document useful (0 votes)
20 views

Write A PHP To Display Form Information of The Client. The Form Information Should Be Displayed in A Table

This document provides instructions for a PHP lab practical to validate user input. Students will write PHP code to display a client's submitted form information in a table. They will design an HTML form to collect client data including name, address, phone number, email, password, payment details, pizza order details. Students will write a function to validate the form inputs, checking for required fields and valid formats, and display error messages or the user's input if valid. The function validates 13 specified fields are correctly filled out.

Uploaded by

Raya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Write A PHP To Display Form Information of The Client. The Form Information Should Be Displayed in A Table

This document provides instructions for a PHP lab practical to validate user input. Students will write PHP code to display a client's submitted form information in a table. They will design an HTML form to collect client data including name, address, phone number, email, password, payment details, pizza order details. Students will write a function to validate the form inputs, checking for required fields and valid formats, and display error messages or the user's input if valid. The function validates 13 specified fields are correctly filled out.

Uploaded by

Raya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical 7: Introduction to PHP

After completion of this lab, you should be able to


Validate user input with PHP and regular expressions
Make previously entered user data re-display in form elements

1. Write a PHP to display form information of the client. The form information should be
displayed in a Table.
2. Design an HTML form as shown below with the following specification

3. Write a function which will perform the following specification

The function should check that the user has done the following things:
A. Provided full name
B. Provided street address
C. Provided a valid phone number(exactly ten digit phone number)
D. Provided valid email address
E. Provided password of at least 5 characters and not more than 15 characters
F. Selected one of the listed card types
G. Provided card number
H. Provided card name
I. Checked at least one spice
J. Selected one of the pizza size
K. Provided the quantity of pizza
L. Selected one of the radio buttons of meat
M. 13. Other requirement field if optional
The function should display error message is there is a problem or displaying the user
input if everything is
correct

You might also like