<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel='stylesheet' type='text/css' href='style.css'/>
<title>Files</title>
</head>
<body class="body">
<?php
$prodnum = $_GET['prodnum'];
$con=mysqli_connect("localhost","root","","sp");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$res = mysqli_query($con,"SELECT * FROM product_info WHERE prodnum = '$prodnum'") OR die(mysqli_error($con)) ;
echo '
<table id="table">
<tr>
<td> <h3> Product Information </h3> </td>
</tr>';
while($row = mysqli_fetch_array($res)){
$prodnum=$row[0];
$farm=$row[1];
$sh=$row[2];
$sdate=$row[3];
$pdate=$row[4];
$edate=$row[5];
$cert=$row[6];
$shsite=$row[9];
$farmsite=$row[10];
echo'<tr>
<td> <b> Product Number:</b> '.$prodnum.'
</td>
</tr>
<tr>
<td> <b> Farm: </b> <a class="links" href='.$farmsite.'> '.$farm.' </a>
</td>
</tr>
<tr>
<td> <b> Slaughter House: </b> <a class="links" href='.$shsite.'> '.$sh.' </a>
</td>
</tr>
<td> <b> Date Slaughtered: </b>'.$sdate.'
</td>
</tr>
<tr>
<td><b> Date Produced: </b>'.$pdate.'
</td>
</tr>
<tr>
<td> <b> Expiration Date: </b> '.$edate.'
</td>
</tr>
<tr>
<td> <b> Certified by: </b> '.$cert.'
</td>
</tr>
</table>'
;
}
?>
</body>
</html>
This code displays the data from my database. I do not how to display the date in mysql in human readable format. The result of this code is for example 2014-03-04 but I want to display it like March 04, 2013. The data type of the dates are date in the mysql database. I only see converting the timestamp data type. How can I do it? How can I also put it in the and tag? Thank you.