Ok. I have changed the date format. Here's the code:
<?php
include("mysql_connect.php");
$query = "SELECT name, email, DATE_FORMAT(date_registered, '%d/%m/%y') AS date FROM user ORDER BY name";
$result = @mysql_query($query);
if ($result)
{
echo "<table><tr><td><strong>Name</strong></td><td><strong>Email</strong></td><td><strong>Date Registered</strong></td></tr>";
while ($row = mysql_fetch_array($result))
{
echo "<tr><td>$row[name]</td><td>$row[email]</td><td>$row[date_registered]</td></tr>";
}
echo "</table>";
mysql_free_result($result);
}
else
echo "The user cannot be displayed due to system error";
mysql_close();
?>
But there other problem. At:
echo "<tr><td>$row[name]</td><td>$row[email]</td><td>$row[date_registered]</td></tr>";
if I put $row[date_registered], it wont display the date. But if I put $row[1], it will display the date. Infact row 1 in the table is the name column, while the date_registered is the 5th column. When I put $row[5] (which should display the date), it didn't. Why is this?