Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Processing Forms 677

24


?><!DOCTYPE html>




Registration Form



Registration Form


<p>Please fill out the form below to register for our site. Fields
with bold labels are required.</p>

<form method="post" action="<?php echo htmlspecialchars($SERVER["PHP
SELF"]);?>">









<p>
<label for="age"><b>Age:</label></b><br>
<input id="age" value="<?php echo htmlspecialchars($age);?>">
<span class="error"><?php echo $ageErr;?></span>
</p>





$options = array('Digital Camera','MP3 Player','Tablet');
foreach ($options as $option) {
echo '
" ;
}
?>







Free download pdf