<?php
$con = mysql_connect("localhost","root","SLAPTA");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("ip", $con);
$ipaddress = $_SERVER['REMOTE_ADDR'];
$result = mysql_query("SELECT * FROM ip WHERE ip = '$ipaddress'");
if(mysql_num_rows($result) != 0)
{
echo 'Tu jau uzsiregistraves';
}
else
{
echo 'Registracija';
exit;
}
mysql_close($con);
?>