i am using a user id , friend id , page and passing the values to a class so that it could detect that the login user can view the profile of other user based on other user’s privacy setting. its such as after the values are passed to the class the query stuff takes place and i am using echo to tell if allow or dont means the output of class comes in these two words based on privacy setting . now the problem is how do i use this output to be used in a variable ?
i am passing the values into class like this
$error_result->check_allowed($friend_id,$id,$page);
now i know i get a output from that class as allow or dont . now how do i use that output further ?
In the function
check_allowed(), after you do the queries, you need to return a TRUE/FALSE value usingreturnstatement. This could be used at the caller’s side.Example:
Hope this helps. Good luck 🙂