You are on page 1of 3

Experiment No:3

Aim: Form Validation


HTML Code:
<!DOCTYPE html>
<html ><head>
<title>Appointment Request</title>
<link href="appointment.css" rel="stylesheet" type="text/css" />
</head>
<body >
<div >
<form method="post" action="appointment2.php">
<div id="header">
<h2>Appointment Request</h2><br>
</header>
<div id="content">
Thank you for scheduling an appointment with us! Please choose a date or time that is
convenient for you and we will do our best to accommodate your request. We will contact you by
phone or send you a confirmation email of your final appointment date and time.</div><br>
</div>
<div id="more">
<ul>
<li>
<label>NAME</label>
<input type="text" name="name" required>
</li><br>
<li>
<label>PHONE </label>
<input type="tel" name="phone" required>
</li><br>
<li>
<label>EMAIL_ID</label>
<input type="email" name="email" required>
</li><br>
</li><br>
<li>
<label class="desc" for="pday"> PREFERRED DAY </label>
<select name="pday">
<option value="Select Below" selected="selected" name="pday"> Select Below
</option>
<option value="Monday" name="pday"> Monday </option>
<option value="Tuesday" name="pday"> Tuesday </option>
<option value="Wednesday" name="pday"> Wednesday </option>
<option value="Thursday" name="pday"> Thursday </option>

<option value="Friday" name="pday"> Friday </option>


</select>
</li><br>
<li>
<label class="desc" for="ptime"> PREFERRED TIME </label>
<select name="ptime">
<option value="Select Below" selected="selected" name="time"> Select Below
</option>
<option value="7 - 10 a.m." name="ptime"> 7 - 10 a.m. </option>
<option value="10 - noon" name="ptime"> 10 - noon </option>
<option value="Noon - 2 p.m." name="ptime"> Noon - 2 p.m. </option>
<option value="2 - 4 p.m." name="ptime"> 2 - 4 p.m. </option>
<option value="After 4 p.m." name="ptime"> After 4 p.m. </option>
</select>
</li><br>
<li>
<label>AGE </label>
<div> <span>
<input type="radio" name="age" value="adult" > adult<br>
</span> <span>
<input type="radio" name="age" value="child">child<br>
</span> </div>
</li><br>
<label>GENDER </label>
<div> <span>
<input type="radio" name="gender" value="female">female<br>
</span> <span>
<input type="radio" name="gender" value="male">male<br>
</span> </div>
</li><br>
<li>
<label>I AM A </label>
<div><span>
<input type="radio" name="g" value="New Patient" >New Patient this field is
required<br>
</span><span>
<input type="radio" name="g" value="Current Patient">Current Patient<br>
</span></div>
</li><br>
<li>
<label class="desc"> HOW CAN WE HELP IT TODAY </label>
<div>
<textarea rows="4" cols="50" name="comment"></textarea>
</div>

</li><br>

<li>

<div>

<p align="center"><a href="submit.html"><input type="button"


value="submit"></a></p>
</div>
</li><br>
</ul>
</form>
</div>
</div>
</body></html>
Form Validation Page:

You might also like