Jump to content

Help with something PHP


lJesterl

Recommended Posts

Im working on a little project simliar to myspace profiles. I have it set where they can set there profile private or not. When set to private the isprivate value is 1 and when its not private the isprivate value is 0. Here is the code I am using to check if the profile is private.

 

$checkprivate=mysql_query("SELECT * FROM private WHERE playerid='$playerid'");

$chkp=mysql_fetch_array($checkprivate);

 

if($chkp[isprivate] == "1"){

include("functions/error2.php");

display_error("Sorry but this user has there profile set to private.","messagecenter.php");

}

 

Everything works fine as far as if the profile is private it will bring up the error page and if it isnt private it will not. But what I need to do is find out how to ignore that if that person is my friend. For example I have a friends table

 

friend1  friend2

 

I need to do something where i $blah = select friend1 from friends where friend2=$plyr[alias] (plyr[alias] is the cooke information if im logged in)

 

then i need something like if $blah ignore $checkprivate

 

hope u guys can understand its a little hard to explain :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.