Sera que te falta un Igual? en el IF
Código PHP:
$i=1;
while($row = mysql_fetch_array($query)) {
if ($x[$i]==true){
$sumatotal=$row["unidades"] + $sumatotal;
$preciototal=$precio*$row["unidades"] +$preciototal;
printf("<tr><td> %s</td><td> %s</td><td> %s </td></tr>",$row["Nombre"],$row["unidades"],$precio*$row["unidades"]);
}
$i=$i+1;
}
pruebalo asi y nos cuentas