Código PHP:
<?php require("configuracion.php");
if(!empty($_POST['seleccion'])) {
$aLista=$_POST['seleccion'];
$q2=mysql_query("SELECT id, SUM(valor) AS total FROM informes where id IN (".implode(',',$aLista).")"); while($row = mysql_fetch_array($q2)) {echo "".$row["total"]."" ; } mysql_free_result($q2);}?>
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in...
Gracias a todos