Well, I'm not quite sure exactly how you plan to impliment this - if you require visitors to login for this, or what....
With the script that was provided - you can either use it with a login, or same page...
make sure you have mySQL installed, a database, and a table sert up for this. You'll need two fields; name and ip.
Once you have that done, change the connection variables so they work with your setup.
Let's try the script again.
<?php
if(!$name) {
print("
<form name=\"\" action=\"$PHP_SELF\" method=\"post\">
<input type=\"text\" name=\"name\">
</form>");
$db_name='databasename';
$db_user='user';
$db_password='password';
$table='whoistracker';
// Connect to the database
$db_conn = mysql_connect("localhost",$db_user,$db_password);
if (!$db_conn)
{
die ("ERROR: Cannot connect to the database.");
//exit();
}
if($name!="") {
$ip = $REMOTE_ADDR;
$insert="INSERT INTO $table (name,ipaddress) VALUES ('$name','$ip')";
$db_query=mysql_db_query($db_name,$insert);
if($dbquery) { print("Done."); } ELSE { print("Didn't work.");
} ELSE { exit; }
?>