How to Show Members From The Same Region
-
Hi Guys,
I would like to show members from the same region when logged in and here is the code I have used but now working:
<!–?php </p–>
bp_loggedin_user_id();
$user_id = 14 ;
$myfield = xprofile_get_field_data( ‘State’, 14);
echo $myfield;xprofile_get_field_data(‘field=Bundesland’, 14);
?><!–?php </p–>
}
$sql=”select * from `
glft448_bp_xprofile_data where value = ‘”.$state.”‘”;
$con1 = mysql_query(“SELECT distinct user_id FROMglft448_bp_xprofile_data
WHEREvalue
= ‘”.$state.”‘”);while($queRes1 = mysql_fetch_array($con1))
{
?>
<!–?php $queRes1[‘user_id’];<br ?–> // echo bp_core_get_userlink($queRes1[‘user_id’]);
?>
<a href=”"<?php”>” >
<!–?php echo bp_core_fetch_avatar ( array( ‘item_id’ =–>$queRes1[‘user_id’] , ‘type’ => ‘thumb’ ) ); ?></a><!–?php </p–>
}
$sqlt=”select * from `glft448_bp_xprofile_data where value = ‘”.$state.”‘”;
$con2 = mysql_query(“SELECT * FROMglft448_bp_xprofile_data
WHEREuser_id
= ‘”.$user_id.”‘ ANDfield_id
= ‘1’ “);while($queRes2 = mysql_fetch_array($con2))
{
?>
<b> <!–?php //echo $queRes2[‘value’]; ?–></b>
I added that code to the text version of the page editor but it’s showing like that on the profile page.
What am I missing?
Thanks
- The topic ‘How to Show Members From The Same Region’ is closed to new replies.