100
« on: August 23, 2006, 10:12:24 PM »
hi
I'm trying add at my index.php page a top 10 users by gender, but this isn't working giving a eval(), error....
here the code:
<?
include "config.php";
$profile_img = '<img src="http://www.site.com/templates/default/images/profile.gif" border="0" align="absmiddle" alt="Member profile">';
$pm_img = '<img src="http://www.site.com/templates/default/images/pm.gif" border="0" align="absmiddle" alt="Private message">';
$db = mysql_connect("$db_host", "$db_user", "$db_password") or die ("Error");
@mysql_select_db("$db_name", $db) or die ("DB not found");
$result = mysql_query("SELECT profile_hits, user_name,user_gender, user_id FROM 4images_users ORDER BY profile_hits WHERE user_level >= '".GUEST."' AND user_gender = 'male' DESC LIMIT 10");
while ($row = mysql_fetch_array($result)) {
echo
"<a href=http://www.blacktragedies.com/private_message.php?action=new&user_id=".$row['user_id'].">".$pm_img."</a>
<a href=http://www.blacktragedies.com/member.php?action=mailform&user_id=".$row['user_id'].">".$mail_img."</a>
<a href=http://www.blacktragedies.com/member.php?action=showprofile&user_id=".$row['user_id'].">".$row['user_name']."</a><br/>";
}
?>
I'm trying added this at my home.html , what is wrong , or how fix it ??