Hi Guys...
Thanks for taking the time and trouble to help me.
This is what used to happen:
I have an ADMIN link at the bottom of the index.php page, which is only visible if the correct ip number is accessing the page.
This is the code that worked fine.
global.php
Code:
$vars["admin link"] = "<a href='/path/to/admin.php'>Admin</a>";
$vars["admin ip"] = "xxx.xxx.xxx.xx1";
if(getenv(REMOTE_ADDR) != $vars["admin ip"]){$vars["admin link"] = "";}
index.php
Code:
require("admin/global.php");
if(getenv(REMOTE_ADDR) == $vars["admin ip"]){
echo $vars["admin link"];
Then, if a visitor came to the index.php page the ADMIN link would not show.
If I came (my ip being xxx.xxx.xxx.xx1) to the index.php page, the ADMIN link would show at the bottom of the page.
Now I want either of TWO ip numbers to activate the ADMIN link (maybe 3 in the future), hence the code in my first post.
This is so that I can ADMIN the site, and so can my client.
And now, using the code in my first post, it doesn't work for either of the ip numbers, which leads me to believe that my coding in the global.php file is wrong.
Hope this gives a better explanation.
Regards,
John C