<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db_ldlp", $con);
$result = mysql_query("SELECT * FROM LB_table");
echo "<table border='8' color='white' >
<tr>
<th>Person Id</th>
<th>Name</th>
<th>Participant Status</th>
<th>Organiztion</th>
<th>Arrival Date</th>
<th>Departure Date</th>
<th>No Of Days</th>
<th>Room Status</th>
<th>Room Charge</th>
<th>Registeration</th>
<th>Total Expense </th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?></br></br></br>
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db_ldlp", $con);
$result = mysql_query("SELECT SUM(TotalAmount) FROM LB_table");
echo "<table border='8'>
<right><tr>
<th>Total Expense value </th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);