- Code: Select all
<?php
$con = mysql_connect("localhost","root","kelvin");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("softeng");
$sql = "SELECT * FROM records WHERE Referrence No = '37-IICF-2011-06' ";
$myData = mysql_query($sql,$con);
echo "<table border=1>
<tr>
<th>Referrence No</th>
<th>Date</th>
<th>Dealer</th>
</tr>";
while($record = mysql_fetch_array($myData)){
echo "<tr>";
echo "<td>" . $record['Referrence No'] . "</td>";
echo "<td>" . $record['Date'] . "</td>";
echo "<td>" . $record['Dealer'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);


