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
https://forums.phpfreaks.com/topic/76933-help-with-something-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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