-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.php
More file actions
71 lines (68 loc) · 1.75 KB
/
data.php
File metadata and controls
71 lines (68 loc) · 1.75 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
<?php
$c = $_POST['product_name'];
$a = $_POST['name'];
$b = $_POST['email'];
$d = $_POST['phone'];
$e = $_POST['url'];
$f = $_POST['ip'];
$g = $_POST['info'];
$h = $_POST['requirement'];
$conn = mysqli_connect("localhost","root", "", "project");
if($conn){
echo "<br>";
}
else{
die("Connection Unsuccessful");
}
$q1 = "Select * from data where email = '$b'";
$check = mysqli_query($conn,$q1);
if(mysqli_num_rows($check)>0){
echo "<html>";
echo "<body>";
echo '<div class="alert alert-danger" >';
echo "<h2>";
echo "You have already submitted your Details. Please Wait for the Result";
echo "</h2>";
echo '<h5>Please go back to <a href="home.php">Home</a></h5>';
echo"</div>";
echo "</body>";
echo "</html>";
}
else{
echo "<html>";
echo "<body>";
echo '<div class="alert alert-success" >';
echo "<h2>";
echo "Your User Requirement has been submitted. Please wait for the result";
echo "</h2>";
echo '<h5><a href="home.php">Please click here to proceed</a></h5>';
echo"</div>";
echo "</body>";
echo "</html>";
$query = $conn->prepare("INSERT into data(product_name,name,email,phone,url,ip,info,requirement) values(?,?,?,?,?,?,?,?)");
$query->bind_param("ssssssss",$c,$a,$b,$d,$e,$f,$g,$h);
$query->execute();
}
mysqli_close($conn);
?>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<style type="text/css">
*{
margin:0 20px;
}
.alert{
border-radius:10px;
margin: 20px auto;
text-align:center;
height:15vh;
}
body{
background:#FA7072;
}
</style>
</head>
<body>
</body>
</html>