-
Notifications
You must be signed in to change notification settings - Fork 0
/
property_info.php
85 lines (60 loc) · 1.8 KB
/
property_info.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Advertise</title>
<?php include_once("head_include.php"); ?>
</head>
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<?php include_once("body_head.php"); ?>
<div class="container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2 box">
<?php
// database connection stuff here
//$email=_SESSION['email'];
if(!isset($_SESSION['email']))
{
redirect("sign_in.php");
}
$id = $_POST['id'];
$_SESSION['id']=$id;
$sql = "SELECT * FROM propertyphoto where id = '{$id}'";
$sql1 = "SELECT * FROM property where id = '{$id}'";
//$sql2 = "SELECT phone FROM user where email = '{$email}'";
$result = query($sql);
?>
<div class="details">
<div class="display_gallery">
<?php
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$photoid = $row["photoid"];
$dir = "uploads";
$filename = $photoid . ".png";
echo "<img style='width:400px; height:300px;' src='$dir/$filename'>";
//echo "$photoid";
}
}
?>
</div>
<div class="text_info" style="font-size: 20px;">
<?php
$result1 = query($sql1);
if ($result1->num_rows > 0) {
// output data of each row
while($row1 = $result1->fetch_assoc()) {
echo "Name: " . $row1["name"] . "<br> Contact: ". $row1["phone"]." <br> Price: ". $row1["price"]." <br> Author: ". $row1["author"]." <br> Description: ". $row1["description"]." <br>";
}
}
?>
</div>
</div>
</div>
</div>
<div class="col-md-2"></div>
</div>
<?php include_once("body_foot.php"); ?>
</div>
</body>
</html>