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
$host = "linux" ;
$user = "MyName" ;
$paswd = "MyPasswd" ;
$db = "MyDb" ;
$qry = "SELECT * From MyTable" ;
mysql_connect("$host", "$user", "$paswd")
or die("No connection to host") ;
mysql_select_db("$db") or die("Cannot select $db") ;
?>
<!--
Could be wriiten with PHP block using print comd.
Out to show that only needed command in PHP to avoid uneccessary parsing overheads
-->
<TABLE>
<?
$result = mysql_query($qry) ;
while ($row = mysql_fetch_array($result))
{
print("<TR>
<TD>$row[PrtNo]</td>
<TD>$row[Mfr]</td>") ;
$no = $row['Qty'] * 5 ;
// Please note that case the filed name is in quotes.
/* Earlier were already in double quotes so no need to quote twice
Single and double quotes have behaviourail diiference
When field names are used as array subscript names they should match case and spelling of the field in SQL.
i.e. if SELECT Prtno, mfr then subscript would be
$row[Prtno] or $row[mfr]
*/
print("<TD>$no</td></tr>") ;
}
?>
</table>
</body>
</html>