Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<body>
<?php
$username = "";
$password = "";
$database = "asterisk";
$mysqli = new mysqli("localhost", $username, $password, $database);
$query = "SELECT * FROM device_stats";
echo '<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td> <font face="Arial">Type</font> </td>
<td> <font face="Arial">Ext #</font> </td>
<td> <font face="Arial">Description</font> </td>
<td> <font face="Arial">Date Entered</font> </td>
</tr>';
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_assoc()) {
$field1name = $row["tech"];
$field2name = $row["user"];
$field3name = $row["description"];
$field4name = $row["CURDATE"];
echo '<tr>
<td>'.$field1name.'</td>
<td>'.$field2name.'</td>
<td>'.$field3name.'</td>
<td>'.$field4name.'</td>
</tr>';
}
$result->free();
}
?>
</body>
</html>
$output_buffer = ob_start(); // start output buffering.
require ourphpscript.php
$htmlbody = ob_get_clean(); // end output buffering and get the output.