Buongiorno ragazzi ho creato uno script che esporta i dati nel db in un file xsl, il problema è che con EI funziona, mentre in Firefox e Google esporta il file php, come posso risolvere?

codice è questo:


codice:
<?php
        header('Content-type: application/vnd.ms-excel');

        include("../config.php");
        $DirPATH = getcwd();
        #$PathAREA = "$DirPATH\\$area_abilitata";
        # $fp=fopen($DirPATH."\coupon.xls", "r+");

        #echo "DIR=".$DirPATH."\coupon.xls";
        # if(!$fp) die ("
Non posso trovare il file");
        
        $righe = "\"".'Nome'."\"\t\"".'Cognome'."\"\t\"".'Task'."\"\t\"".'Università'."\"\t\"".'Giorni'."\"\t\"".'E-mail'."\"\n";
                                                                                           #"\"\t\"".'E-mail'."\"\n";
        $query3 = mysql_query("select * from modulo order by id DESC", $db) or die(mysql_error());

        while($query_data = mysql_fetch_row($query3)) {

        $nome = $query_data[1];
        $cognome = $query_data[2];
        $task_Cognome = $query_data[3];
        $uni = $query_data[4];
        $email = $query_data[5];
		$giorni = $query_data[6];

        $righe .= "\"".$nome."\"\t\"".$cognome."\"\t\"".$task."\"\t\"".$uni."\"\t\"".$email."\"\t\"".$giorni."\"\n";


        } // end While


        echo $righe;


?>