Hi friends, I want to find download time in PHP by sending a request to my MySQL server. I have one table with an href link to download the file. If I click download the download time should show beside the file name in a table. Can anyone please help me out? Today is my deadline. Please check out my code:
<?php
$con = mysql_connect("localhost","mt","mt");
mysql_select_db("mt", $con);
$d=date("d/m/Y H:i:s");
$result = mysql_query("SELECT * FROM mt_upload");
echo "<table BORDER=2 BORDERCOLOR=RED>
<tr>
<th>FileName</th>
<th>FilePath</th>
<th>Uploaded Date/Time</th><th>Download Date/Time</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo
"
<tr>
<td>". $row['FileName'] . "</td>
<td ><a href=../sites/default/files/ourfiles/". $row['FileName']." >Download</a></td>
<td>".$row['DateTime']."</td><td>$d</td>
</tr>" ;
}
echo "</table>";
mysql_close($con);
?>