I'm trying to show data from my first row of db in a html page.. this is: index.html I don't understand where is wrong..
<div class="container">
<h3>Menu del giorno <?php $currentDate = date("d-m-Y"); echo $currentDate;?></h3><br/>
<?php
$con=mysqli_connect("localhost","root","root","mydb");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM menu");
while($row = mysqli_fetch_array($result)) {
echo "<p style="text-align: center;"><strong>Cucina:</strong></p><br/><br/>";
echo "<p>Primi</p><br/>";
echo "<p>" . $row['piatto1'] . "</p><br/>";
echo "<p>" . $row['piatto2'] . "</p><br/><br/>";
echo "<p>Secondo</p><br/>";
echo "<p>" . $row['secondo'] . "</p><br/>";
}
mysqli_close($con);
?>
</div>