can anyone explain to why this script wont get the ip’s i?ve got in my db?
It probably IS getting the IP’s you have in your DB, but the way you are retrieving them is incorrect. $banned contains only a number of rows that the query returned. You should really look into mysql_fetch_array http://us3.php.net/mysql_fetch_array or mysql_fetch_assoc http://us3.php.net/mysql_fetch_assoc
Finally please have a look at http://phphelp.com/forums/viewtopic.php?t=2752 as it would make things much easier for all concerned.