Sample Live Data phpmysqli



<div id="show_LIVE"></div>
<script type="text/javascript" src="js/jquery-3.4.1.js"></script>
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(document).ready(function() {
setInterval(function () {
$('#show_LIVE').load('data.php')
}, 20);
});
</script>


<style>
div.a {
  text-transform: uppercase;
}

div.b {
  text-transform: lowercase;
}

div.c {
  text-transform: capitalize;
}
</style>


<?php
 set_time_limit (0);
ini_set("display_errors", "off");
$conn = new mysqli('localhost', 'root', '', 'webcam', '3306');
if ($conn->connect_error) {
die("Connection error: " . $conn->connect_error);
}
$result = $conn->query("SELECT
id,
Name,
Title,
img,
date_created,
Profession

FROM live");
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
   ?>
<div class="c">

<img src="img/<?php echo $row['img'] . ''; ?>" width="137" height="112" />



<br />
<?php echo $row['Title'] . ''; ?>


<br />


<?php echo $row['date_created'] . ''; ?>
<br />

<hr />
</div>
<?php }}; ?>

Comments