Jump to content

Quick Question about echo value


Leveecius

Recommended Posts

Hey guys, I'm trying to get something to show differently in one of my scripts.  I'm trying to make it so that people that are a certain rank in my game will have their names show up bold in the users online.  so I figured it would go like this:

 

mysql_query("SELECT * FROM users WHERE username='$username'");
$rank=$rows['rank'];
$rankpoints=$rows['rankpoints'];

if($rankpoints>=50000){
echo '<b>$rank</b>' ; }

 

Is that right?  Because normally when they hit this certain rank, it updates their rank in the database to RANK.  However, when viewing users online, it doesn't show it.  Anyone know why?  Either way, I would like for them to get their names in bold.

Link to comment
https://forums.phpfreaks.com/topic/179737-quick-question-about-echo-value/
Share on other sites

actually use this code:

 

sorry for the double post

 

<?php
$result = mysql_query("SELECT * FROM users WHERE username='$username'") or die(mysql_error());  
$row = mysql_fetch_array($result)

$rank=$rows['rank'];
$rankpoints=$rows['rankpoints'];
$be_bold = "50000";

if ($rankpoints > $be_bold) {
echo "<b>$rank</b>"; 
}

?>

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.