Hello,
i have managed to get hold of social engine and trying to edit the profile script to create a friends list like facebook instead of it saying i have so many friends,
This is my first time using smarty so im still learning
this is my profile.php
$page_id = $_GET['user'];
$sql = "SELECT * FROM se_friends WHERE friend_user_id1 = '$page_id' AND friend_status = '1' LIMIT 0,9";
$mysql = mysql_query($sql) or die (mysql_error());
$all_friends = array();
$all_info = array();
while ($rows = mysql_fetch_array($mysql))
{
$friend_id = $rows['friend_user_id2'];
$query = "SELECT * FROM se_users WHERE user_id = '$friend_id'";
$mysql = mysql_query($query) or die(mysql_error());
while($get = mysql_fetch_array($mysql))
{
array_push($all_info, $get);
}
}
$smarty->assign("friends_list", $all_info);
then profile.tpl
{section name=i loop=$friends_list}
<td><img class='photo' src='./images/nophoto.gif' width="50" height="50" align="absmiddle" border='0'><a style="padding-left:5px" href="profile.php?user={$friends_list[i].user_id}">{$friends_list[i].user_displayname}</a></td>
{/section}
the first mysql statment works perfectly but the second one is not it only gets one results