Ho già scritto il codice ma devo adattarlo per quello descritto sopra

Codice PHP:
 $visualvideo=mysql_query($Qry);
                                             if (!
$visualvideo){
                                                  echo 
"error";
                                             }
                                             while(
$view=mysql_fetch_array($visualvideo)){
                                                  
$id stripslashes($view['id']);
                                                  
$video stripslashes($view['nomefile']);
                                                  
$data stripslashes($view['data']);
                                                  
$ora stripslashes($view['tempo']);
                                                  
$nome stripslashes($view['nome']);
                                                  
$luogo stripslashes($view['luogo']);
                                                  echo 
"<tr><td align='center' width='100'>" $nome "</td>";
                                                  echo 
"<td align='center'>" $luogo "</td>";
                                                  echo 
"<td align='center'>" $ora "</td>";
                                                  echo 
"<td align='center'>" $data  "</td>";
                                                  echo 
"<td align='center'>[url='javascript:Play($id)']riproduci[/url]</td>";
                                                  echo 
"<td align='center'>[url='downloadvideo.php?id=$id ']download[/url]</td>";
                                                  echo 
"<td align='center'>[url='erasevideo.php?id=$id']cancella[/url]</td>";
                                                  echo 
"<td align='center'><input type='checkbox' name='DelSel' value='$id'/></td></tr>";
                                                  
                                             }
                            echo 
"</table>"
Che apre poi il player video
Codice PHP:


                <?php
                    
if($id=$_GET['id']){
                    echo 
'<div class="riproducivideo">';
                    
$visualvideo=mysql_query("SELECT * FROM video where id='$id'");
if (!
$visualvideo){
     echo 
"error";
}
while(
$view=mysql_fetch_array($visualvideo)){
     
$id stripslashes($view['id']);
     
$nomefile stripslashes($view['nomefile']);
                              
$nome stripslashes($view['nome']);
                              
$luogo stripslashes($view['luogo']);
                              
     
}
                    echo 
'<table>
  <tr>
    <td><embed src="' 
$nomefile '" width="600" height="400" scale="aspect" controller="true"></td>
  </tr>
  <tr>
    <td>' 
$nome ' ' $luogo '</td></tr></table>';
                    echo 
'</div>';
                    }
                
?>
            </div>
               <?php