Student Registration form using PHP
Design Screensort:
code :
<html>
<head>
<style>
p{ color:red;}
</style>
</head>
<Center>
<h1> Student Registration </h1>
</Center>
<h1> Enter the student details </h1>
<body>
<form method ="post">
<p> Enter Name </p>
<input type = "text" name = "name"/>
<p>Enter registration ID </p>
<input type "text" name ="Number"/>
<p> Enter the college ID</p>
<input type= "text" name="cid"/>
<p>course Type</p>
<input type = "radio" name = "course" value ="UG">UG
<input type = "radio" name = "course" value ="PG">PG
<p> select gender </P>
<input type = "radio" name = "gender" value ="male">male
<input type = "radio" name = "gender" value ="female">female
<select name ="course1">
<option value="">select course </option>
<option value="BCA">BCA </option>
<option value="MCA">MCA</option>
<option value="Btech">Btech</option>
<option value="Mtech">Mtech</option>
<option value="Phd">Phd</option>
</select>
<p>Enter DOB</p>
<input type="date" name="date"/>
<p> Enter student address</p>
<textarea name="text1" cols="40" rows"5"></textarea>
<input type= "Submit" name="SS">
<input type="reset" name ="reset"/>
</form>
<?php
if(isset($_POST['SS']))
{
$name=$_POST['name'];
$regid=$_POST['Number'];
$collegeid=$_POST['cid'];
$gender=$_POST['gender'];
$course=$_POST['course'];
$programme=$_POST['course1'];
$DOB=$_POST['date'];
$address=$_POST['text1'];
echo"name of student:".$name;
echo"<br>";
echo"reg id:".$regid;
echo"<br>";
echo"college id:".$collegeid;
echo"<br>";
echo"gender:".$gender;
echo"<br>";
echo"course:".$course;
echo"<br>";
echo"programme:".$programme;
echo"<br>";
echo"Dob:".$DOB;
echo"<br>";
echo"address:".$address;
}
?>
</body>
</html>
Comments
Post a Comment