-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcardinfo.php
53 lines (47 loc) · 1.54 KB
/
cardinfo.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
<!DOCTYPE html>
<html>
<head><title>WaterCan supply</title></head>
<body style="background-image:url(imagese.jpg);background-repeat:no-repeat;background-size:100% 100%;background-attachment:fixed">
<header>
<h1><center><i><b>DAVANGERE WATERCAN SUPPLY</b></i></center></h1>
<h2><center><i><b>CUSTOMER CARD INFORMATION</b></i></center></h3>
</header>
<?php
if(isset($_POST['num'])){
$num = $_POST['num'];
}
$connection = mysqli_connect("localhost","root","") or die("coudnt connect to the server");
$db = mysqli_select_db($connection,"watersupply") or die("coudnt select the database");
$checkPhone=" SELECT Phone FROM memship WHERE Phone='$num'";
$query=mysqli_query($connection,$checkPhone);
if(mysqli_num_rows($query)==1)
{
$query="SELECT * FROM memship where Phone='$num'";
$result = mysqli_query($connection,$query) or die("Querry failed:".mysqli_error($connection));
echo "<table border='1' align='center' frame='box' bgcolor='#00bfff'>";
echo "<tr>";
echo "<th>Card No</th><th>Customer Name</th><th>Phone No</th><th>Amount</th>";
echo "</tr>";
while($row=mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>",$row['cardno'],"</td><td>",$row['name'],"</td><td>",$row['Phone'],"</td><td>",$row['amt'],"</td>";
echo "</tr>";
}
echo "</table>";
}
else{
echo "<center>";
echo "<h1><i><b>Number Does'nt Exist<h1></b></i>";
echo "</center>";
}
mysqli_close($connection);
?>
<br><br>
<center>
<form action="home.html" >
<button style="color:blue;border-radius:100px;"><b>HOME</b></button>
</form>
</center>
</body>
</html>