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 7960297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:42:58+00:00 2026-06-04T04:42:58+00:00

Sorry i really don’t know how to code in PHP but i need to

  • 0

Sorry i really don’t know how to code in PHP but i need to create a popup from picture(button) with the code provided below! It could also be a reveal inviter box too … but it needs to stay the same (not the Facebook inviter box)

if(count($user_data)>0) {
    $user = get_users(array('fb_user_id'=>$user_data['id']));
    $invited_ids = $user[0]['invited_ids'];
    $invited_ids_tab = json_decode($invited_ids, true);
    $nb_invited_friends = count($invited_ids_tab);

    //page header
    echo '<img src="'.$user_data['picture'].'" style="width:36px; vertical-align:middle; margin-right:10px; margin-bottom:10px;">';
    echo '<b>Bienvenue '.$user_data['name'].'</b> (<a href="#" id="fb_box_fb_logout_btn">Déconnection</a>) - ';

    if(count($user)>0) echo 'Nombre d\'amis invité <b>'.$nb_invited_friends.'</b>';
    else echo 'You didn\'t invite any friend yet.';

    echo ' - <a href="./content.php">Voir les coupons disponible </a>';

    echo '<hr><br>';

    //display inviter
    $inviter = displayInviter();
    echo $inviter;
}
else {
    echo '<a href="#" id="fb_box_fb_login_btn" class="facebook16">Connect with Facebook</a>, Invite your friends and Unlock your reward !';
}

?

What i want in a popup is

$inviter = displayInviter();
echo $inviter;

Thank you

  • 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-04T04:42:59+00:00Added an answer on June 4, 2026 at 4:42 am

    PHP can’t make popups by itself, because once the page renders, PHP shuts down, so to speak.
    What you’ll need is Javascript, the easiest way would be to use jQuery’s ajax method to call the PHP page with the code you provided, load the code output into a hidden div element and then make it pop up using the fadeIn method, for example.

    Or, if you want to keep the code within the same page, do the same as above, only instead of using the load() function, just echo the popup content into the hidden div.

    Simple example:

    HTML/PHP

    <div id="popup" style="display: none;"><?php echo displayInviter(); ?></div>
    

    JS function

    $('#popup').fadeIn();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A really boring question, sorry, but I really don't know that yet ;) I've
Sorry about the vague title, but I really don't know how to describe this
I'm really sorry to have to ask this, but I clearly don't understand something
Sorry about the wording of the question, I don't really know how to put
I am sorry for the title but I really do not know how to
first of all I am sorry for the bad description, but I really don't
(Sorry for the title, I don't really know how to phrase that :-) )
Ok, sorry if this is a repost, I really don't know how to word
Really sorry for the extremely stupid title, but if I know what it is,
Sorry, I really don't know how to summarize the title of this question. So,

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.