-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess5.php
More file actions
44 lines (40 loc) · 1.48 KB
/
process5.php
File metadata and controls
44 lines (40 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<title>Student Detail</title>
<link rel="stylesheet" href="frmstyle.css" type="text/css">
<style>
@import url('https://fonts.googleapis.com/css?family=Baloo+Bhaina');
@import url('https://fonts.googleapis.com/css?family=Baloo+Bhaina|Exo');
</style>
</head>
<body background="wallpaper-for-hd-7.jpg" background-position="right center">
<div class="header">
<div class="header">
<div>Student<span>Details</span></div>
<?php
$name=$_REQUEST["fname"];
$email=$_REQUEST["email"];
$mob=$_REQUEST["mob"];
$pwd=$_REQUEST["pwd"];
$date=$_REQUEST["date1"];
$city=$_REQUEST["city1"];
$gender=$_REQUEST["gender"];
$certificate=$_REQUEST["certificate"];
for($i=0;$i<count($certificate);$i++){
$cert=$cert.",".$certificate[$i];
}
$dbhost="localhost";
$dbuser="root";
$dbpass="mysql";
$dbname="student";
$conn=mysqli_connect($dbhost,$dbuser,$dbpass,$dbname) or die("Error while connecting to mysql");
$query = "INSERT INTO stu_detail (stuName, stuEmail, stuMobile, stuPassword, stuDob, stuCity, stuGender, stuCertificate) VALUES ('$name','$email','$mob','$pwd','$date','$city','$gender[0]','$cert');";
mysqli_query($conn, $query) or die("Error while saving data !");
echo "<center><p>You have successfully registered!<br>Name: $name<br> Email: $email<br> Mobile Number: $mob</p></center>";
mysqli_close($conn);
?>
</div>
</div>
</body>
</html>