Is that possible I call the .post data to a hidden input, and then get the hidden input value. The reason I am doing this because bp_core_get_user_domain() is not working in URL(search.php), I am using wordpress.
$('#tag').click(function(){
$.post("search.php", {
search_id: $("#id_tag").text()
},
function(data)
{
$("#member_id").val(data);
}
);//$.post
});
//this is not search.php
<?php
<input type="hidden" id="member_id" />
$member_id=(hidden input value);
$user_link=bp_core_get_user_domain( $member_id );
<input type="text" id="tag"/>
?>
Use WordPress Ajax and store the value with
update_option('member_id');
and than do a query to check if what that value is.