Question:

Can someone give me a syntax using PHP mysql database ... opening a browser and displaying the mysql database

by  |  earlier

0 LIKES UnLike

Upon saving it will directly save to MS Excel ... without installing any.

 Tags:

   Report

1 ANSWERS


  1. Use these headers:

    header("Content-Disposition: attachment; filename=\"database.xls\"");

    header("Content-Type: application/vnd.ms-excel");

    Then make a SELECT with all the data you need, implode the fields using "\t" and echo "\n" at the end of each row, like this:

    foreach($rows as $row) {

    echo implode("\t",array_values($row))."\n";

    }

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions