Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8508383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:08:49+00:00 2026-06-11T03:08:49+00:00

i am using a user id , friend id , page and passing the

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:08:51+00:00Added an answer on June 11, 2026 at 3:08 am

    In the function check_allowed(), after you do the queries, you need to return a TRUE/FALSE value using return statement. This could be used at the caller’s side.

    Example:

    // ---- function definition inside the class
    function check_allowed($friend_id,$id,$page)
    {
      // do some queries or whatever operation..
      if($query_succeeded)
        return true;
      else
        return false;
    }
    
    
    //----------------- outside the class, we are calling this function..
    
    $result = $error_result->check_allowed($friend_id,$id,$page); 
    if($result == true)
    {
      echo "Allowed";
    }
    else
    {
      echo "Not allowed";
    }
    

    Hope this helps. Good luck 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My friend made it so that on their page you can't right click on
How to detect apple computers using user-agent ? Safari may be run in windows
I'm building in Expression Engine 2.3 a user profile system using Solspace's User and
When I access a page using a web browser, I can see more information
HTML : <a href=/profile.php?user={$username}&action_request=friend_request> Friend request </a> PHP : if(isset($_GET['user']) && isset($_GET['action_request'])) { if(strcmp($_GET['action_request'],friend_request)
can I have a question about how to redirect the page after user invite
I'm currently building a very low level CMS for friend's artist web page that
I'm trying to create a Email to friend page using php. The objective of
If a user goes to profile?id=20 , using request.getPathInfo() just returns /profile . Is
I'm trying to get a list of user's friends using fb connect for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.