Jump to content

Displaying a clickable playername


Gubbins

Recommended Posts

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);
}

Link to comment
https://forums.phpfreaks.com/topic/190166-displaying-a-clickable-playername/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.