Create a PHP file to validate the following HTML form (name it validate.php): <h
ID: 3701108 • Letter: C
Question
Create a PHP file to validate the following HTML form (name it validate.php):
<html>
<body>
<form action="validate.php" method="GET">
<center><b><font size=10>Guestbook</font></b></center>
<center>
<br />
Subject: <input type="text" name="subject"><br/>
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br><br/>
Comments: <textarea name="comment"></textarea><br/><br>
</center><input type="submit">
</form>
</body>
</html>
Explanation / Answer
<?php
?>
<html>
<body>
<form action="validate.php" method="GET"> /* validate.php is the php file where our input will checked and verified .*/
<center><b><font size=10>Guestbook</font></b></center>
<center>
<br />
Subject: <input type="text" name="subject"><br/>
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br><br/>
Comments: <textarea name="comment"></textarea><br/><br>
</center><input type="submit">
</form>
</body>
</html>