<?php
require($_SERVER["DOCUMENT_ROOT"]."/config/db_config.php");
$connection = @mysql_connect($db_host,$db_user, $db_password);
mysql_select_db ($db_name,$connection);

$cur_IP = $_GET ["IP"];

echo "Pages viewed by $cur_IP:<br>";

$query = "SELECT * FROM tracker WHERE IP = '$cur_IP' ORDER BY date_auto";
$result= mysql_query($query,$connection);
for($i=0; $i < mysql_num_rows($result);$i++)
{
$page = mysql_result($result, $i,"page") ;
$date_auto= mysql_result($result, $i, "date_auto");
$date = date("H:i:s m/d/y", $date_auto);

echo "Page: $page Date:$date <br>";

}

?>