I have a DB now that tracks the screen names of people who visit my site via aim.
It works good.
However I would like to add onto it.
My current script is
track.php
Code: Select all
<?
$username= "******";
$password= "****";
$database= "********";
$connection = mysql_connect('localhost',$username,$password);
mysql_select_db($database);
$get=array();
foreach(explode('|',$_SERVER['QUERY_STRING']) as $get) {
$get = explode('-',$get);
$my_get[$get[0]]=$get[1];
}
$sn2 = str_replace("%20", "", $get[0]);
$sn = str_replace("sn=", "", $sn2);
if ($_SERVER['REMOTE_ADDR'] != '68.195.158.8') {
if ($sn != '') {
$date = date("m.d.y");
$time = date('g:i a',time()+3600);
$ip = @$REMOTE_ADDR;
$sql = "INSERT INTO `Tracker` ( `Number` , `Screen Name` , `Page` , `Date` , `Time` , `IP` )
VALUES (
'', '$sn', '$page', '$date', '$time', '$ip'
);
";
$result = mysql_query($sql) or die(mysql_error());
}
}
?>Code: Select all
<?php
$sql = "SELECT *
FROM `Tracker`
ORDER BY `Number` DESC ";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)) {
echo "<tr>";
echo "<td align=center>".$row['Number']."</td>";
echo "<td align=center>".$row['Screen Name']."</td>";
echo "<td align=center>".$row['Page']."</td>";
echo "<td align=center>".$row['Date']."</td>";
echo "<td align=center>".$row['Time']."</td>";
echo "<td align=center>".$row['IP']."</td>";
echo "</tr>";
}
?>I would like to make my stats look like this

without the details link, but i do want the delete link. and when the delete link is clicked it will delete the screen name out of the DB.
when a screen name is clicked, i would like a new window to pop up, and display all the pages the screen name has been to in the same format, with the delete link.
This is very hard to do I am guessing.
I just need advice on how to do this, and then I will start it myself.
Thank You
Burrito: removed username and password.