I'm trying to make my register script check the database's IP column and compare it with the user's IP. If the User's IP equals that in the DB column, it should say "Sorry, there is already an account registered with your IP Address. Please log in.", and if there's no IP match, it should allow them to continue with registering.
I've been tinkering around with this for a while and I can't seem to figure it out. Any help would be appreciated
if ($_SERVER['REMOTE_ADDR'] == mysql_query("SELECT ip FROM users")) {
die('Sorry, there is already an account registered with your IP Address. Please <a href="/login.php>log in.</a>');
}else{
echo '';
}
I think the problem is with the mySQL query...