download excel sheet from mysql database in php -
To fill the sheet, mysql dominates me to download the database when I try to download, I get the following errors
Notice: Unchanging Variables: C: \ xampp \ htdocs \ admissions excel excel2.php 27 in the data: Undefined variables: Header C: \ Xampp \ htdocs \ admissions \ excel \ excel2.php On Line 12
There is a code here and where I need to define headers and data
" select from a single entry "; $ result = mysql_query ($ Query) or die ('Please select any one field to export'); // headers ('content -Web: Annex; Title ("Content-Type: Text / CSV '); Title (" Content-Properties: ("Content-nature: filename =". $ Filename. "Csv"); $ line = mysql_fetch_assoc ($ result); if ($ line) {}; Echocsv (array ($ title); echo "e rocs"; echocsv (array_keys ($ line));} while ($ line) {hokolv ($ line); $ line = mysql_fetch_assoc ($ result);} function Acolove ($ field) {$ Separator = ''; Foreign currency ($ field $ field) {if (preg_match ('/ \\ r | \\ n |, |' / ', $ field)) {$ field =' '' Str_replace ('' ',' '' ', $ field) '' '; } Echo $ separator $ area; $ Separator = ','; } Repeat "\ r \ n"; }
Comments
Post a Comment