Jump to content
MakeWebGames

Recommended Posts

Posted
if($var['id'] == 1) {echo "link here";}

 

Ugh. Since you have the $ir variable probably in the local scope.

 


if( $ir['location'] == 1 ) {
  echo "<a href='#'>A link for location ID 1</a> <br />";
  //Add more...?
}

if( $ir['location'] == 2 ) {
  echo "<a href='#'>A link for location ID 3</a> <br />";
  //Add more...?
}

//Etc...
Posted

if( $ir['location'] != "2") {

echo "You cant access this area!";

echo "<a href='travel.php'> Move to location? </a>";

//footer shit

exit;

}

place that in the file you want to limit access to.

 

  • 4 weeks later...
Posted

Ok, links are working fine. I have

 

if (in_array($ir['location'], array(105, 103, 90, 182, 39, 160, 40, 218, 131, 101)))
       {
           echo "

 

But other pages that have multi functions are now confusing me. The above line again would work, but does it really need repeated EVERY function? That is going to really slow down the speed after awhile.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...