There are severalk ip's in the database table name IP and just 1 colum(row) called ip.
anyways i have made this code:
Code: Select all
mysql_connect("myhost", "myuser", "mypass") or die(mysql_error());
mysql_select_db("mydbname") or die(mysql_error());
$data = mysql_query("SELECT * FROM IP")
or die(mysql_error());
$bip = mysql_fetch_array( $data );
if($host == ".$bip['ip'] . ") { die("<hr>This ip is blacklisted..."); }
Thanks
Gemster