Hi guys.

I've been looking around the universe of Google but can't find anything that is applicable with the "type" of radio boxes I'm using.
I did a little bit of brainstorming and what I came up with, I thought, should work 'in theory'. I just need a bit of a push in the right direction.

What I'm doing is querying a database. The results are then displayed as radio boxes using a while loop (so there is no specific number of responses or prefixed names). Now, what I need to happen is that when a user clicks on a radio button, further information (specific to that ID) appears.

I don't mind if this uses a GET function (?id=123) because I've spent a couple of hours moving everything away from POST so that data isn't lost when the page is refreshed.


What i've done (and it doesn't respond at all!)

Code:
echo "<form>";

while ($explode_count_dec > "0"):
$while_query = mysql_query("SELECT * FROM printers WHERE ID LIKE '$explodedata[$explode_number]'");
$while_result = mysql_fetch_assoc($while_query);

echo "<input type='radio' value='".$explodedata[$explode_number]."' name='printer' onClick='showmore(".$explode_number.")' />".$while_result["Model"]." <BR /> ";

++$explode_number;
--$explode_count_dec;
endwhile;

echo "</form>";
and the JS:

Code:
<script type="text/javascript">
function showmore($text) {
  var room = "<?= $get_location; ?>";
  window.location = "?location=" + room + "&id=" + <?php $text; ?> // Couldn't do just $text here? I wish I knew JS..
}
</script>