How to Transfer your Data in Database to Excel in PHP/MySQL
Submitted by alpha_luna on Saturday, June 11, 2016 - 15:17.
If you are looking for on how to Transfer your Data in Database to Excel then you are at the right place. This PHP Excel tutorial the user enables to make a backup copy of your data in your database in the form of excel worksheet. Kindly click the button to save the excel file to your computer.
Creating a table with your data from the database and one button to download the data and save it as excel file as shown in the image below.
Here's the source code in the image above.
For more question about this source code just email me at [email protected] or comment in this tutorial. Hope that this tutorial will help you a lot.
- <div class="alert alert-info">
- </div>
- <?php
- $excel = mysql_query("select * from member")or die(mysql_error());
- $row = mysql_fetch_array($excel);
- $member_excel_id = $row['member_id'];
- ?>
- <form method="POST" action="excel.php">
- <input type="hidden" name="id_excel" value="<?php echo $member_excel_id; ?>">
- </form>
- <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
- <thead>
- <tr>
- </tr>
- </thead>
- <tbody>
- <?php
- $query = mysql_query("select * from member") or die(mysql_error());
- while ($row = mysql_fetch_array($query)) {
- ?>
- <tr>
- </tr>
- </tbody>
- </table>
Thank you
Add new comment
- 239 views