i am trying to do an if ip check so that if a certain ip (namely one ip) loads the page they see additional information.
Heres what if quickly put together but is always showing true.
PHP Code:
<?php
// Get Ipaddress
$IP = getenv("REMOTE_ADDR");
// Show IP address for test
echo "IP:".$IP;
// IF statement
if ($IP = "192.168.1.4") {
echo "yes you are John Grooms";
} else {
echo "sorry you are not John Grooms";
}
?>
The network here is on a Static Ip address so the ip does not change. Everything works up to the if statement.
Bookmarks