我试图显示引号,但我似乎无法得到数据显示在索引页我仍然是新的php和mysql和它一直是一个拉夫路
html索引页
<div class="quote">
<div class="container">
<blockquote class="blockquote">
<p class="mb-0">"<?php echo $row['feedback']; ?>"</p>
<footer class="blockquote-footer"><?php echo $row['companyname']; ?></footer>
</blockquote>
<blockquote class="blockquote-reverse">
<p class="mb-0">"<?php echo $row['feedback']; ?>"</p>
<footer class="blockquote-footer"><?php echo $row['companyname']; ?></footer>
</blockquote>
<blockquote class="blockquote">
<p class="mb-0">"<?php echo $row['feedback']; ?>"</p>
<footer class="blockquote-footer"><?php echo $row['companyname']; ?></footer>
</blockquote>
</div>
</div>
和数据库连接
<?php
$hostname = "";
$username = "";
$password = "";
$db = "";
$dbconnect=mysqli_connect($hostname,$username,$password,$db);
if ($dbconnect->connect_error) {
die("Database connection failed: " . $dbconnect->connect_error);
}
$query="SELECT companyname,feedback,status from review WHERE status=? ORDER BY RAND() LIMIT 3";
?>
1条答案
按热度按时间vfh0ocws1#