Lab Task4 PHP Formvalidation
Lab Task4 PHP Formvalidation
Lab Task4 PHP Formvalidation
Goal(s)
PHP form Validation
XAMPP
Apache
PHP basics
Academic Honesty
All the work that you do toward the fulfilment of this assignment must be your own unless
collaboration is explicitly allowed (e.g., by some problem set or the final project). Viewing or copying
another individual's work (even if left by a printer, stored in an executable directory, or accidentally
shared in the course's virtual classroom) or lifting material from a book, magazine, website or from
other sources, even partially and presenting it as your own, constitutes academic dishonesty, as does
showing or giving your work, even in part, to another student.
Similarly, dual submission academic dishonesty: you may not submit the same or similar work to this
course that you have submitted or will submit to another. You should not provide or make available
your assignments to individuals who have taken this course or may take this course in the future.
You are welcome to discuss the course's material with others in order to better understand it. You
may even discuss problem sets with classmates, but you should not share code. You may also turn to
the Web for instruction beyond the course's lectures, for references, and for solutions to technical
difficulties, but not for outright solutions to problems on projects. However, failure to cite (as with
comments) the origin of any code or technique that you do discover outside of the course's lectures
and (even while respecting these constraints) and then integrate into your own work may be
considered academic dishonesty.
Grades
Your work will be evaluated along the following axes.
Page | 1
CSC 3222: WEB TECHNOLOGIES
Problem 1
Design and validate the following form.
Functional Requirements
1. All empty values should be checked.
2. Check for html characters.
3. Username must contain at least 6 characters and space is not allowed.
4. Email should be validated with php. Conditions must contain @ and at least one .(dot) after
@
5. Date fields’ options should be generated by loop.
6. Phone number fields will only accept numeric value.
7. Password must contain at least 8 character, 1 special character(only check # or ?),1 number
and combination of uppercase and lowercase alphabet.
Page | 2
CSC 3222: WEB TECHNOLOGIES
Technical Requirements
Your PHP should be well-formed.
You should not use an intelligent text editor to generate HTML.
Use these php functions
o Htmlspecialchars($string)filtering html tags
o strlen($string)finding the length of a string
o is_numeric($string)checking a string is numeric or not
o strpos($string,$char)finding character/word position In a string
o isset($var)checking a variable is set or not
o empty($var)checking a string is empty or not
o ctype_upper($string)checking of uppercase existence
o ctype_lower($string)checking of lowercase existence
Submission
Github
Page | 3