i have this code to export from mysql to excell in wordpress i am calling this file with link
    <?php include("header.php"); 
    $table = 'driver_detail';
    $file = 'export';
    $result = mysql_query("SHOW COLUMNS FROM ".$table."");
    $i = 0;
    if (mysql_num_rows($result) > 0) {
    while ($row = mysql_fetch_assoc($result)) {
    $csv_output .= $row['Field']."; ";
    $i++;
    }
    }
    $csv_output .= "\n";
    $values = mysql_query("SELECT * FROM ".$table."");
    while ($rowr = mysql_fetch_row($values)) {
    for ($j=0;$j<$i;$j++) {
    $csv_output .= $rowr[$j]."; ";
    }
    $csv_output .= "\n";
    }
    $filename = $file."_".date("Y-m-d_H-i",time());
    header("Content-type: application/vnd.ms-excel");
    header("Content-disposition: csv" . date("Y-m-d") . ".csv");
    header( "Content-disposition: filename=".$filename.".csv");
    print $csv_output;
    exit;
    ?>
but i am having this error .. how to fix this
 Warning: Cannot modify header information - headers already sent by (output started at /home5/revoluv0/public_html/proj/autobodyparts/get-details/header.php:3) in /home5/revoluv0/public_html/proj/autobodyparts/get-details/export-driver.php on line 24
 
     
    