<?php $curip = $_SERVER['REMOTE_ADDR']; $myarray = array (); if (!in_array ($curip, $myarray)){ echo $curip . " is in array"; } else { echo $curip . " is not in the database."; } ?>