Jump to content

in_array() help


waverider303

Recommended Posts

I want to create an if statement that will check through an array for a specific ip address (kind of a anti spam system).

 

<?php
/*
*$usr_ip - is the ip address pulled from the form
*$banned_ip - is the array of ip address's to search through
*/
if (in_array($usr_ip, $banned_ip)) {
	die("Banned User!");
} else {
}
?>

 

Shouldnt This work?

Link to comment
https://forums.phpfreaks.com/topic/184660-in_array-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.