-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontactdb.php
More file actions
35 lines (28 loc) · 811 Bytes
/
Copy pathcontactdb.php
File metadata and controls
35 lines (28 loc) · 811 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
<?php
$cont = $_POST['phone'];
$c=0;
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "abes";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$s="select contact from enquiry";
$rs=$conn->query($s);
if ($rs->num_rows > 0) {
// output data of each row
while($row = $rs->fetch_assoc()) {
if($cont==$row["contact"])
{
$c=$c+1;
include_once('Update.php');
}
}
}
if($c==0)
{
header('location: Guest.php');
}
?>