Sólo por cambiar esta parte:
Código:
$body .= "<span><strong>Cursos Seleccionados:</strong></span><br>";
$tabla = $mysqli->query("select curso.nombreCurso from curso_asistente
inner join curso on curso.idCurso = curso_asistente.nomCurso
where idUsuario='".$id."'");
if( $tabla->num_rows > 0 ){
$body .="Cursos donde obtuvo cupo:<br>";
while($row=$tabla->fetch_array()){
$body .= " + ".htmlentities($row[0])."<br>";
}
}else{
$body .="Usted no se encuentra inscrito en algún curso.<br>";
}
$body .="Desafortunadamente no pudo inscribirse en los siguientes cursos:<br>" .$cursosLlenos;
Y colocarlo arriba de este:
Código:
$body .= "<strong>Datos De registro:</strong><br>";
$body .= "<strong>Folio</strong>:".$row[6]."<br>";
$body .= "<strong>Nombre:</strong>".$row[1]." ".$row[2]." ".$row[3]."<br>";
$body .= "<strong>Registrado como:</strong>".$row[5]."<br>";
$body .= "<strong>Institución</strong>:".$row[4]."<br><br>";
El correo ya no se envía...