rendered paste body<?php
//create connection
$con = mysql_connect("localhost","tcrofts3","timmy");
// select the database to use
$sel=mysql_select_db("tcrofts3_db1", $con);
echo "<br>";
echo "Asset Details";
//run the query
$result = mysql_query("SELECT * FROM AssetDetails");
echo "<table border=1>";
echo "<tr><td>";
echo "Asset No";
echo "</td><td>";
echo "Asset Name";
echo "</td><td>";
echo "Location";
echo "</td><td>";
echo "Creation Time";
echo "</td><td>";
//access each row via an array
while($row = mysql_fetch_array($result,MYSQL_BOTH))
{
echo "<tr><td> ";
echo $row[0]."</td><td>".$row[1]."</td><td>".$row[2]."</td><td>".$row[3];
echo "<br />";
echo "</td></tr> ";
}
echo "</table>";
echo "<br>";
echo "Asset Modification";
//run the query
$result = mysql_query("SELECT * FROM AssetModification");
echo "<table border=1>";
echo "<tr><td>";
echo "Date & Time of Modification";
echo "</td><td>";
echo "Asset No";
echo "</td><td>";
echo "Modification Made";
echo "</td><td>";
echo "Reason for Change";
echo "</td><td>";
//access each row via an array
while($row = mysql_fetch_array($result,MYSQL_BOTH))
{
echo "<tr><td> ";
echo $row[0]."</td><td>".$row[1]."</td><td>".$row[2]."</td><td>".$row[3];
echo "<br />";
echo "</td></tr> ";
}
echo "</table>";
mysql_close($con);
?>