I have this leaderboard: leaderboard
when you click a name in the leaderboard, a popup window is displayed. pop-up window
Now I want to display information about any person whose name was clicked in a pop-up window. As you can see, the popup does not contain any data.
I am using an active directory, from where I can get data like pic profile and other information from the DB database that I support.
Question: How to link the active directory and databases and display the necessary information in a pop-up window when the name is clicked. Please, help
Javascript related to popup:
$(document).ready(function() { $('.tab a').on('click', function(e) { e.preventDefault(); var _this = $(this); var block = _this.attr('href'); $(".tab").removeClass("active"); _this.parent().addClass("active"); $(".leadboardcontent").hide(); $(block).fadeIn(); }); $('.leaderboard li').on('click', function () { $('#popup').fadeIn(); var mark = $(this).find('name').text(); var small = $(this).find('points').text(); $('#popup-name').text('Name: ' + name); $('#popup-score').text('Score: ' + points); }); });
for the active directory I use this variable and repeat it wherever I want for the registered user:
<?php $username = $_POST['username']; $password = $_POST['password']; $server = 'ldap:xxxxx'; $domain = 'xxx' $port = xxx; $ldap_connection = ldap_connect($server, $port); if (! $ldap_connection) { echo '<p>LDAP SERVER CONNECTION FAILED</p>'; exit; }
source share