Check if user has filled the required fields
Posted: Wed May 28, 2003 8:18 am
How do I check if the user has filled the required fields and if the email address of the user is valid or not.
The required fields here are:
Name
Address1
Interest
E-mail
Age Confirmation
The required fields here are:
Name
Address1
Interest
Age Confirmation
Code: Select all
<form name="form1" method="post" action="mail.php">
<p>Name* :
<input name="Name" type="text" id="Name">
</p>
<p>Address1*:
<input name="Address1" type="text" id="Address1">
</p>
<p>Address2:
<input name="Address2" type="text" id="Address2">
</p>
<p>City:
<input name="City" type="text" id="City">
</p>
<p>Interest*:
<select name="Interest">
<option selected>----- Select -----</option>
<option value="Dance">Dance</option>
<option value="Singing">Singing</option>
<option value="Drama">Drama</option>
</select>
</p>
<p>E-mail*:
<input name="email" type="text" id="email">
</p>
<p> Age Confirmation*:
<input name="age" type="checkbox" id="age" value="yes">
Yeah I am over 13</p>
<p>
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
</p>
</form>