-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
99 lines (87 loc) · 3.18 KB
/
signup.php
File metadata and controls
99 lines (87 loc) · 3.18 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
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
<?php
$conn=mysqli_connect("localhost","root","","project");
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$name=$_POST['Full_Name'];
$email=$_POST['Email'];
$password=$_POST['Password'];
$batch=$_POST['Batch'];
$phone_number=$_POST['Phone_Number'];
$hall=$_POST['Hall'];
$gender=$_POST['Gender'];
$sql="insert into signup(Full_Name,Email,Password,Batch,Phone_Number,Hall,Gender)
values('$name','$email','$password','$batch','$phone_number','$hall','$gender')";
$data=mysqli_query($conn,$sql);?>
<div style="position: relative; left: 650px; top: 80px; color: green;"><?php if($data)
{
echo "Your Registration has been completed";
}
else
{
die("Connection failed: " . mysqli_connect_error());
}?></div> <?php
}
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Registration Form | CodingLab </title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<!-- Title section -->
<div class="title">Registration (Administration)</div>
<div class="content">
<!-- Registration form -->
<form action="#" method="POST">
<div class="user-details">
<!-- Input for Full Name -->
<div class="input-box">
<span class="details">Full Name</span>
<input type="text" placeholder="Enter your name" name="Full_Name"required>
</div>
<!-- Input for Username -->
<div class="input-box">
<span class="details">Designation</span>
<input type="text" placeholder="Enter your Designation" name="Batch" required>
</div>
<!-- Input for Email -->
<div class="input-box">
<span class="details">Email</span>
<input type="text" placeholder="Enter your email" name="Email" required>
</div>
<!-- Input for Phone Number -->
<div class="input-box">
<span class="details">Phone Number</span>
<input type="text" placeholder="Enter your number" name="Phone_Number" required>
</div>
<!-- Input for session -->
<div class="input-box">
<span class="details">Password</span>
<input type="text" placeholder="Enter your password" name="Password" required>
</div>
<!-- Input for Confirm hall -->
<div class="input-box">
<span class="details">Address</span>
<input type="text" placeholder="Enter your Address" name="Hall" required>
</div>
</div>
<!-- Radio buttons for gender selection -->
<div class="input-box">
<span class="details">Gender</span>
<input type="text" placeholder=" Enter your gender" name="Gender" required style="height: 40px; width:300px;">
</div>
<!-- Submit button -->
<div class="button">
<input type="submit" name="Register" value="Register">
</div>
<div class="login-link">
Already have an account? <a href="welcome.php"><span style="color: blue;">Login here</span></a>
</div>
</form>
</div>
</div>
</body>
</html>