<?php
header('Content-type: application/vnd.ms-excel;charset=iso-8859-15');
header('Content-Disposition: attachment; filename=archivo.xls');
?><table border="1" cellpadding="2" cellspacing="0" width="100%">
<?php 

include 'concha.php';

mysql_connect ("$host", "$usuario", "$contra");

mysql_select_db ("$basedatos");

$ID = (int)$_GET['ID'];

$sql65 = "SELECT * FROM `registrados_sorteos` WHERE `ID_sorteo` = '$ID'";
$consulta65 = mysql_query ($sql65);
while ($row65 = mysql_fetch_array($consulta65))
{

$ID = $row65["ID"];
$nombre = $row65["nombre"];
$email = $row65["email"];
$telefono = $row65["telefono"];
$dni = $row65["dni"];
$pregunta = $row65["pregunta"];
?>
    <tr>
        <td><?php echo $nombre ?></td>
        <td><?php echo $email ?></td>
        <td><?php echo $telefono ?></td>
        <td><?php echo $dni ?></td>
        <td><?php echo $pregunta ?></td>
    </tr>
<?
 }
mysql_free_result($consulta65);

?></table>