Javacript add image after name tied to id
<p>A friend of mine passed me a ShoutBox for an upgrade. Some users who are DJ in the site's radio want to show an [R] image after their name.</p>

<p>My problem is I can't tie it to an id.</p>

<p>Here is my code</p>

<pre><code>var radios = document.getElementById("radios"); 
if(radios.innerHTML == 'yes') {
   radio = 'the image here';

  }
</code></pre>

<p>and here is the username show</p>

<pre><code>h = ' &lt;a href="/userdetails.php?id=' + nps[a][1] + '" class="c' + nps[a][3] + ' " target="_blank"&gt;' + nps[a][2] + "&lt;/a&gt; ";
</code></pre>

<p>the problem is if i add it like this</p>

<pre><code>h = ' &lt;a href="/userdetails.php?id=' + nps[a][1] + '" class="c' + nps[a][3] + ' " target="_blank"&gt;' + nps[a][2] + "&lt;/a&gt; " + radio;
</code></pre>

<p>it adds the image to everybody's name,instead of exclusively radio DJ. </p>

<p>Could please someone give me a hint what I'm missing?</p>

<p>I really want to do this in javascript for practice.</p>

<p>here is the php</p>

<pre><code>$id = 0 + $_SESSION['id'];
$r = mysql_query(" SELECT radios FROM users WHERE id = ".$id." ");
$radio = mysql_fetch_array($r);
echo  "&lt;div id='radios'&gt;" . $radio ['radios'] . "&lt;/div&gt;";
</code></pre>
