0

I use a PHP like this a lot to let me see messages to myself when viewing my sites locally...

switch(PHP_OS)
{
 case 'Linux':
 break;
 default:
 echo 'This message displays locally only.';
 break;
}

I just wondered if there's some script or trick I can use to let me see messages ONLINE that others can't see. For example, I might visit mysite/topics/buffalo and see a message like this:

switch($User)
{
 case 'Me':
 echo 'All the ungulate pages include master/ungulates.php';
 break;
 default:
 // Only the webmaster can see this message.
 break;
}

In fact, I know of one trick that would work. I could simply use the CSS style display: none to render a message invisible but use a different CSS style locally to render it invisible. However, that's a little sloppy, because the content would still be visible in the HTML.

David Blomstrom
  • 1
  • 3
  • 16
  • 31

1 Answers1

1

if you have a login procedure on that site, you can simply do an

if($user == "me_myself") {
  echo "<p>my personal comment</p>";
}
Johannes
  • 59,058
  • 16
  • 59
  • 114