100% found this document useful (1 vote)
1K views4 pages

Program: Computer Engineering Course-Web Development Using PHP (22619) Practical Answer Sheet

This document contains a registration form code with field validation. The code includes form fields like first name, last name, email, date of birth, gender, mobile number, user type, and password. It applies validation for fields like email using the email input type, mobile number using a pattern, and password requiring a minimum length and mix of characters. On form submission, the data will be sent to a registrationform.php file for processing.

Uploaded by

parag sakhare
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
100% found this document useful (1 vote)
1K views4 pages

Program: Computer Engineering Course-Web Development Using PHP (22619) Practical Answer Sheet

This document contains a registration form code with field validation. The code includes form fields like first name, last name, email, date of birth, gender, mobile number, user type, and password. It applies validation for fields like email using the email input type, mobile number using a pattern, and password requiring a minimum length and mix of characters. On form submission, the data will be sent to a registrationform.php file for processing.

Uploaded by

parag sakhare
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/ 4

Program: Computer Engineering (NBA Accredited)

Course- Web Development Using PHP (22619)


` Practical Answer Sheet

Name of Student Parag Sakhare

Roll No. 19203C1016

Class CO6I-C

Experiment No 12

Date 9/06/2021

Experiment Title:

Develop web page with data validation.

Program Code:

a) Write a program to validate the fields used to design a registration form in experiment 10-11

<!DOCTYPE html>

<html>

<head>

<title>Registration form</title>

<link rel="stylesheet" href="styel.css" type="text/css">

</head>

<body>

<div class="main">

<div class="register">

<h2>Register Here</h2>

<form id="register" action="registrationform.php" method="post">

<label>First name:</label>

<br>

<input type="text" id="fname" name="fname" placeholder="Enter your first

name">

1
Program: Computer Engineering (NBA Accredited)
Course- Web Development Using PHP (22619)
` Practical Answer Sheet
<br>

<br>

<label>Last name:</label>

<br>

<input type="text" id="lname" name="lname" placeholder="Enter your last

name">

<br>

<br>

<label for="email">Enter your email:</label>

<br>

<input type="email" id="email" name="email" placeholder="Enter valid email">

<br>
<br>

<label>Date of Birth:</label>

<br>

<input type="date" id="dob" name="dob" placeholder="Enter your Birthday">

<br>

<br>

<label>Gender:</label>

<br>

&nbsp;&nbsp;&nbsp;

<input type="radio" id="male" name="gender" value="male">

&nbsp;

<span id="male">Male</span>

&nbsp;&nbsp;&nbsp;&nbsp;

<input type="radio" id="female" name="gender" value="female">


2
Program: Computer Engineering (NBA Accredited)
Course- Web Development Using PHP (22619)
` Practical Answer Sheet
&nbsp;

<span id="female">Female</span>

<br>

<br>

<label>Enter mobile number:</label><br><br>

<input type="tel" id="mobno" name="mobno" placeholder="Enter your mobile

number" pattern="[7-9]{1}[0-9]{9}" required>

<br>

<br>

<label>Select Usertype</label>

<br>

<select name="usertype" id="usertype">

<option value="Student">Student</option>

<option value="Staff">Staff</option>

<option value="Alumni">Alumni</option>

</select>

<br>

<br>

<label>Password:</label>

<br>

<input type="password" id="pwd" name="password" placeholder="Enter your

password" pattern ="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one
uppercase

and lowercase letter, and at least 8 or more characters" required>

<br>

<br>
3
Program: Computer Engineering (NBA Accredited)
Course- Web Development Using PHP (22619)
` Practical Answer Sheet
<input type="submit" id="submit" name="submit" value="Submit">

</form>

</div><!-----end of register--->

</div><!-----end of main---->

</body>

</html>

Output:

You might also like