UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  eUKhost's Official Web Hosting Forum > Web Hosting and Domains > PHP Hosting

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 22-12-2009, 06:10
new member
 
Join Date: Dec 2009
Posts: 7
Default export reports as .csv file in browsers computer

Hi all,

I had generated backend reports as tables. now i have to give the option to export that table. Already im using manual code to export data as .csv file . But the pbm is, this report is getting stored in server itself ( same folder where the code is). but i need some code to save file in client (user ) mechine.
some one plz help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 23-12-2009, 00:22
DavidAllen's Avatar
Premium Member
 
Join Date: Jan 2007
Location: Amersham
Posts: 505
Send a message via MSN to DavidAllen Send a message via Skype™ to DavidAllen
Default

Hi
It is actually surprisingly easy to do

PHP Code:
header"Content-type: application/octet-stream");
header"Content-disposition:  attachment; filename=My.csv"); 
echo out the above and then just echo the csv file contents and hey presto - one csv (called My.csv) will be downloaded to the users computer


Hope this helps
__________________
David Allen - www.serina.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 23-12-2009, 04:54
new member
 
Join Date: Dec 2009
Posts: 7
Default

Ya its woking fine. thanks for help...
But, one more problem,is


Generally, the popup will ask us three option ==> open, save, cancel.
But this popup asks ==> Find, save, Cancel

Why ? Can u explain me plz !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 23-12-2009, 09:40
DavidAllen's Avatar
Premium Member
 
Join Date: Jan 2007
Location: Amersham
Posts: 505
Send a message via MSN to DavidAllen Send a message via Skype™ to DavidAllen
Default

Quote:
Originally Posted by beginner View Post
Generally, the popup will ask us three option ==> open, save, cancel.
But this popup asks ==> Find, save, Cancel

Why ? Can u explain me plz !
Think it's because there is no program associated with .csv files on your computer. if you set .csv to always open with Excel or notepad (or whatever program you want) then the find option will change to 'Open'

Regards
__________________
David Allen - www.serina.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 23-12-2009, 09:45
new member
 
Join Date: Dec 2009
Posts: 7
Default

Great, thanks for help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT. The time now is 01:33.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
UK Web Hosting by eUKHosting 3.1.0
UK Web Hosting by eUKHosting 3.1.0
Copyright © 2001-2012, eUKhost LTD. All rights reserved.

 


UK VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

VoIP Dedicated Servers
Asterisk, Trixbox Dedicated Servers

Business Web Hosting
100% uptime Hosting

UK Cpanel Hosting
cPanel Shared Hosting

Domain Hosting
Cheap Domains & Hosting Plans

UK Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

ColdFusion Hosting
ColdFusion Web Hosting
 
 

Android and Apple App


knowledgebase articles
eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting

Joomla Hosting
Joomla Web Hosting

Mambo Hosting
Mambo Web Hosting

Magento Hosting
Magento Web Hosting

Wordpress Hosting
Wordpress Web Hosting

 

Web Hosting Affiliate Program
 

popular blog categories

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles