DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jQuery Mobile-webtoepassing</title>
<link href="jquery.mobile-1.3.0.min.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="jquery.mobile-1.3.0.min.js" type="text/javascript"></script>
</head>
<body>
<?php
$verbinding=mysqli_connect("localhost","user","password","database");
if (mysqli_connect_errno($verbinding))
{
//echo "Verbinden is niet gelukt: " . mysqli_connect_error();
}
else
{
echo "Verbinden is gelukt!";
}?>
<section id="firstpage" data-role="page">
<header data-role="header" data-theme="c" class="top">
<h1>Jullie reacties</h1>
</header>
<div class="content" data-role="content">
<div data-role="collapsible-set">
<div data-role="collapsible">
<?php
$result = mysqli_query($verbinding,"SELECT * FROM comments
WHERE location_id=1");
while($row = mysqli_fetch_array($result))
{
echo $row['comment'] ;
echo "<br>";
}?>
</div>
<div data-role="collapsible">
<?php
echo "<h1>Twitter</h1>";
$result = mysqli_query($verbinding,"SELECT * FROM comments
WHERE location_id=2");
while($row = mysqli_fetch_array($result))
{
echo $row['comment'] ;
echo "<br>";
}
mysqli_close($verbinding);
?>
</div>
</div>
</div>
<div data-role="footer"data-theme="c" class="foot">
<h4>Sociale Media Ouderavond</h4>
</div>
</section>