-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.php
More file actions
49 lines (29 loc) · 982 Bytes
/
Copy pathinput.php
File metadata and controls
49 lines (29 loc) · 982 Bytes
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
<?php
<?php
//Step 1 : To Connect to database
$conn = mysqli_connect("localhost","root","","users");
if(isset($_POST['sub'])){
if(!empty($_POST'name']) && !empty($_POST['phone_no'] ) && !empty($_POST['email']) && !empty ($_POST['password']) && !empty($_POST['confirmpassword']) && !empty($_POST['desription']) ){
$name = $_POST['name'];
$phno = $_POST['phone_no'];
$email = $_POST['email'];
$pass = $_POST['password'];
$cpass = $_POST['confirm_password'];
$desc = $_POST['desription'];
$query = "insert into covid_details (name, phone_no, email, password, confirm_password,description) VALUES('$name','$phno','$email','$pass','$cpass','$desc')";
//Step 3 : To Execute the Query
$run = mysqli_query($conn,$query);
if($run)
{
echo "<script>alert('Inserted Successfully')</script>";
}
else
{
echo mysqli_connect_error();
}
}
else{
echo "all feilds required";
}
}
?>