I have a loop that displays documents in a table with a radio button. Once selected I want it to display reset of the data. Right now when I click the radio button it will only display the first row of the documents how can I get my switch to switch between the radio values.
<?php
   while( $row1 = mysql_fetch_array($myQ1) ) 
    {
     echo "<td><input type='radio' name='tog' id='tog' onClick='gtdoc()'       value='$row1[2]'>$row1[3]</input></td></tr>"; 
    $tog = $row1[2]; $ObjIndex = $tog[$i];
     }
for ($i = 0; $i <= $tog; $i++) 
{ 
   if($tog[$i] != '0') 
   { 
    switch ($ObjIndex[$i]) 
    {
      case $tog:
      echo $row1[3];
      break;
    }
   }
}
$myQ9 = mysql_query("SELECT `iDocuments`.`File`.`FileIndex`, `iDocuments`.`File`.`FileName`, `iDocuments`.`Object`.`ObjectIndex`, `iDocuments`.`Object`.`ObjectName`, `iDocuments`.`Version`.`Version`, `iDocuments`.`File`.`UploadDate` FROM `iDocuments`.`Version` INNER JOIN `iDocuments`.`Object` ON `iDocuments`.`Object`.`ObjectIndex` = `iDocuments`.`Version`.`ObjectIndex` JOIN `iDocuments`.`File` ON `iDocuments`.`Version`.`FileIndex` = `iDocuments`.`File`.`FileIndex` WHERE `Object`.`ObjectStatus` = '1' AND `Version`.`Version` = ( SELECT MAX(`Version`) FROM `iDocuments`.`Version` WHERE `Version`.`ObjectIndex` = `Object`.`ObjectIndex` ) AND `Object`.`ObjectIndex` = '$ObjIndex'");
if (!$myQ9) 
   {  
      echo 'Could not run query 9: ' . mysql_error(); 
   }
else 
   { 
      $row9 = mysql_query($myQ9);
   }
    while( $row9 = mysql_fetch_array($myQ9) ) 
   {
      echo "<table name='doclist'>           
      <tr><td>FileID</td><td><input name='DocFileID' type='text' readonly='true' value='$row9[0]'></input></td></tr> 
      <tr><td>File Name</td><td><input name='DocFileName' type='text' readonly='true' value='$row9[1]'></input></td></tr> 
      <tr><td>ObjectID</td><td><input name='DocID' type='text' readonly='true' value='$row9[2]'></input></td></tr>  
      <tr><td>Object Name</td><td><input name='DocName' type='text' readonly='true' value='$row9[3]'></input></td></tr>  
      <tr><td>Current Version</td><td><input name='CurrVer' type='text' readonly='true' value='$row9[4]'></input></td></tr>
      <tr><td>Update Date</td><td><input name='lstupdate' type='text' readonly='true' value='$row9[5]'></input></td> </tr>
      </table>";
   }
?>