-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.php
108 lines (84 loc) · 4 KB
/
app.php
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html>
<head>
<title>Students Registration form</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="styles.css">
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
/>
</head>
<body>
<div class="main-block">
<div class="left-part">
<i class="fas fa-graduation-cap animate__animated animate__pulse animate__infinite "></i>
<h1 class="animate__animated animate__pulse animate__infinite">Register to our courses</h1>
<!-- <p>W3docs provides free learning materials for programming languages like HTML, CSS, Java Script, PHP etc.</p> -->
<div class="btn-group">
<a type="button" class="btn btn-info mt-1" href="display.php" >Check your Info</a>
</div>
</div>
<form method="post">
<div class="title">
<i class="fas fa-pencil-alt"></i>
<h2>Register here</h2>
</div>
<div class="info">
<input class="fname" type="text" name="name" required placeholder="Full name" autocomplete="off">
<input type="text" name="email" required placeholder="Email" autocomplete="off">
<input type="text" name="phone" required placeholder="Phone number" autocomplete="off">
<input type="password" name="password" required placeholder="Password" autocomplete="off">
<select name="degree" autocomplete="off">
<option value="course-type" selected>Course type</option>
<option value="short-courses">Computer Science</option>
<option value="featured-courses">Information Science</option>
<option value="undergraduate">Mettalurgy</option>
<option value="diploma">Data Science</option>
<option value="certificate">Ruby on Rails</option>
<option value="masters-degree">App Development</option>
<option value="postgraduate">Android Development</option>
<option value="postgraduate">Full Stack Web Developer</option>
</select>
</div>
<!-- <div class="checkbox">
<input type="checkbox" name="checkbox"><span>I agree to the <a href="https://www.w3docs.com/privacy-policy">Privacy Poalicy for W3Docs.</a></span>
</div> -->
<button type="submit" name="submit" class="btn btn-info p-2" >Submit</button>
</form>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
<?php
include 'connection.php' ;
if(isset($_POST['submit']))
{
$name=$_POST["name"];
$email=$_POST["email"];
$phone=$_POST["phone"];
$password=$_POST["password"];
$degree=$_POST["degree"];
$inputquery="insert into students_data(name,email,phone,password,degree) values('$name','$email','$phone','$password','$degree')";
$res=mysqli_query($con,$inputquery);
if($res)
{
?>
<script>
alert( "Data inserted successfully");
</script>
<?php
}
else{
?>
<script>
alert( "Data not inserted");
</script>
<?php
}
}
?>