/ Published in: PHP
when im running the program the browser forced to download the file which i convert using php code(it askng do u want to download). what i want is simply run the program and convert the file as csv and csv file has to open automatically(no need of downloading dialouge box). plz let me know the solution well in advance.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$query = "SELECT name, email,address FROM table name"; $result = $db->sql_query($query); $file_name = "example.csv"; { echo($data['name']); echo","; echo($data['email']); echo","; echo($data['address']); echo","; echo("\t\n"); }