Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JTN Designer

Pages: 1 2 [3]
31
<?php
include "nav.html";
print 
"<font color=\"white\">"$_SERVER['REMOTE_ADDR'] ."</font>";
if 
$_SERVER['REMOTE_ADDR'] = 127.0.0.1 Then {
echo 
"<meta http-equiv=\"refresh\" content=\"5; url=http://www.mysite.com/dir/noview.php\" />" }
?>


Why doesn't it work?

Edit: Returns this message
Parse error: parse error, unexpected T_VARIABLE, expecting '(' in /home/deadly7/public_html/ on line 15
Quote
if $_SERVER['REMOTE_ADDR'] = 127.0.0.1 Then {
That is line 15.

Although this has been resolved; Mark since you're using a Boolean, try to put the include statement on the return true section of the script, I.E.

<?php
if($_SERVER['REMOTE_ADDR'] == "127.0.0.1"
     { 
?>
     <meta http-equiv="refresh" content="5; url=noview.php">
     <?php
     
} else {
                include 
"nav.html";
                }
?>

Pages: 1 2 [3]