Function Favorites() {
$sql = "SELECT favorites FROM Login WHERE Name='".$wgcuser."'" or die(mysql_error());
$result = mysql_query($sql);
while ($fav = mysql_fetch_row($result)) {
$favs = $fav['0']; }
if (strlen($favs)<1){
print("<td class='shadow'>You currently have no favorites.</td>");
}else{
$fav = explode(",",$favs);
sort($fav);
for ($i=0;$i<count($fav);$i++){
if (strlen($fav[$i])>0){
print("<TR><td class='shadow'><a href='game.php?game=".$fav[$i]."'>".$fav[$i]."</a><td class='shadow'><a href='removefav.php?game=".$fav[$i]."'><i>(Remove)</i></a></TD></TD></TR>"); } } }
}