Displaying a clickable playername

Posted on 16th Feb 2014 by admin

I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playername = mysql_query("SELECT * FROM `players` WHERE `playername` LIMIT 1");
while($f = mysql_fetch_array($playername)){

$txt = str_replace("[player]", "<a href='profile.php?player={$f['playername']}'>{$f['playername']}>", $txt);
$txt = str_replace("[/player]", "</a>", $txt);
}

Other forums