Re: If code not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christopher Malton wrote:
To all,
I appear to have a problem with my If statement. No error is presented to me, but does anyone see what is wrong. IP addresses masked for safety & security.


Code as follows:
<?php
if(
($_SERVER["REMOTE_ADDR"]=="x.x.x.x")||
($_SERVER["REMOTE_ADDR"]=="y.y.y.y")||
0
){
 header("Location: /access_disabled.php");
 exit();
}
?>

Chris
 Ehm... It should work. I've rewritten it a tad:


<?php

if($_SERVER["REMOTE_ADDR"]=="x.x.x.x" || $_SERVER["REMOTE_ADDR"]=="y.y.y.y" || 0)
	{
	header("Location: /access_disabled.php");
	exit();
	}
?>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux