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.
<?php
$host="localhost";
$user="root";
$pass="";
$database="databasename";
$sConn = mysql_connect($host, $user, $pass) or die("Couldn't connect to database server");
$dConn = mysql_select_db($database, $sConn)or die("Couldn't connect to database $database");
echo '<table border="1" width="100%"><tr align="center"><td>Column 1</td><td>Column 2</td><td>Column 3</td><td>Column 4</td></tr>';
$CharacterLimit=30; // Define how many characters to be displayed
$sql = "SELECT * FROM tablename";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
echo "<tr>\n";
echo "<td width='25%'>".$row['Column1']."</td>\n";
$Column2 = $row['Column2'];
$ColumnLimit = substr($Column2, 0, $CharacterLimit);
echo "<td width='25%'>".$ColumnLimit."...</td>\n";
echo "<td width='25%'>".$row['Column3']."</td>\n";
echo "<td width='25%'>".$row['Column4']."</td>\n";
echo "</tr>\n";
}
echo "</table>";
?>