-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebReviews.php
151 lines (108 loc) · 3.73 KB
/
webReviews.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>User Reviews</title>
</head>
<link rel="stylesheet" href="styles.css">
<body>
<section class="section-stories">
<!-- keeping video in a div which is same size of section in element called video -->
<div class="bg-video">
<video class="bg-video-content" autoplay muted loop >
<source src="images/video1.mp4" type="video/mp4">
<source src="images/video1.webm" type="video/webm">
Your browser is not supported
</video>
</div>
<div class="u-center-text margin-8">
<h2 class="heading-secondary">
</h2>
</div>
<div class="row"> <!--row only for centering here -->
<div class="story">
<figure class="story_shape">
<img src="images/default.jpg" alt="" class="story-img">
<figcaption class="story-caption">
Sandy
</figcaption>
</figure>
<div class="story_text">
<h3 class="heading-tertiary margin-2">
<?php
$host='localhost';
$user='root';
$password='';
$dbname='hotel_reviews';
$con= mysqli_connect($host,$user,$password,$dbname);
if(!$con){
die("connection failed".mysqli_connect_error($con));
}
else{
// echo "<br>";
// echo 'connected succesfully';
// echo "<br>";
}
$sql="SELECT name,review FROM reviewdataa WHERE id=1";
$name1="SELECT name FROM reviewdataa WHERE id=1";
$results=mysqli_query($con,$sql);
if(mysqli_num_rows($results)>0){
while($row=mysqli_fetch_array($results)){
echo "<p style='visibility:hidden'>$row[1]</p>";
echo "<h4>$row[0] </h4>";
echo "<h4>$row[1]</h4>";
echo "<p style='visibility:hidden'>$row[1]</p>";
}
}
mysqli_close($con);
?>
</h3>
</div>
</div>
</div>
<div class="row"> <!--row only for centering here -->
<div class="story">
<figure class="story_shape">
<img src="images/default.jpg" alt="" class="story-img">
<figcaption class="story-caption">
Tommy
</figcaption>
</figure>
<div class="story_text">
<h3 class="heading-tertiary margin-2">
<?php
$host='localhost';
$user='root';
$password='';
$dbname='hotel_reviews';
$con= mysqli_connect($host,$user,$password,$dbname);
if(!$con){
die("connection failed".mysqli_connect_error($con));
}
else{
// echo "<br>";
// echo 'connected succesfully';
// echo "<br>";
}
$sql="SELECT name,review FROM reviewdataa WHERE id=2";
$results=mysqli_query($con,$sql);
if(mysqli_num_rows($results)>0){
while($row=mysqli_fetch_array($results)){
echo "<p style='visibility:hidden'>$row[1]</p>";
echo "<h4>$row[0] </h4>";
echo "<h4>$row[1]</h4>";
echo "<p style='visibility:hidden'>$row[1]</p>";
}
}
mysqli_close($con);
?>
</h3>
</div>
</div>
</div>
<div class="u-center-text margin-top-10">
<a href="webReviewss.php" class="btn-textt">Read more stories →</a>
</div>
</section>
</body>
</html>