Student Registration Form
Student Registration Form
Stud.php
<html>
<head>
<title>Sample Form</title>
</head>
<body bgcolor="grey">
<center>
<marquee behavior=alternate>
</marquee><br>
<tr>
</tr>
<tr>
<td>Address :- </td>
</tr>
<tr>
<td>City :- </td>
<option value="Surat">Surat</option>
<option value="Valsad">Valsad</option>
<option value="Navsari">Navsari</option>
</select></td>
</tr>
<tr>
<td>Gender :- </td>
</tr>
<tr>
<td>Hobbies :- </td>
</td>
</tr>
<tr>
<td>DOB :- </td>
</tr>
<tr>
</tr>
<tr>
<td>Email Id :- </td>
</tr>
<tr>
<td>Password :- </td>
</tr>
<tr>
</tr>
</table>
</form>
</center>
</body>
</html>
Valid.php
<?php
$Name=$_POST['txtname'];
$Address=$_POST['txtadd'];
$City=$_POST['selcity'];
$Gender=$_POST['gender'];
$Hobbies="";
if (isset($_POST['reading']))
$Hobbies=$_POST['reading'];
if (isset($_POST['playing']))
$Hobbies=$Hobbies.$_POST['playing'];
if (isset($_POST['dancing']))
$Hobbies=$Hobbies.$_POST['dancing'];
}
$DOB=$_POST['date'];
$Mobile=$_POST['mobile'];
$Email=$_POST['email'];
if(empty($Name))
elseif (!preg_match('/^[a-z]*[a-z]$/',$Name))
if(empty($DOB))
if(empty($Mobile))
if(isset($_POST['txtsubmit']))
?>