if then header problem
Posted: Wed May 17, 2006 4:24 pm
I would like to use an if then statement for two header locations.
say i access page hello.php from my ip address 127.0.0.1 then i get sent to index.php
but if i access from any other ip i get sent to goodbye.php
i set them as variables like this:
any ideas on how to make this work?
say i access page hello.php from my ip address 127.0.0.1 then i get sent to index.php
but if i access from any other ip i get sent to goodbye.php
i set them as variables like this:
Code: Select all
$header = 'if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') header("Location: hello.php");';
$header2 = 'header("Location: goodbye.php");';