un saluto a tutti e un grazie a chi mi risponderà

dovrei inviare in una unica email il risultato di questa query ma non ci riesco
qualcuno puo darmi una mano

grazie infinite

Codice PHP:
$query1 "SELECT username,value FROM radcheck WHERE Chiave='$Chiave' and attribute='$attribute'";
$result5 mysql_query($query1);

if (!
$result5) {
    die(
"Errore nella query $query1: " mysql_error());
 }
echo 
'
<table border="1">
    <tr>
         <th>Usernanme</th>
         <th>Password</th>
   </tr>'
;

  while (
$row mysql_fetch_assoc($result5)) {
      
$nome123     htmlentities($row['username']);
      
$psw123     htmlentities($row['value']);

//$messaggio = "Usernanme:" . $row['username'] . "\n";
//$messaggio .= "Passsword:" . $row['value']  . "\n";


      
echo "<tr>
             <td>
$nome123</td>
             <td>
$psw123</td>
          </tr>"
;
  }

echo 
'</table>'