Jump to content

duck__boy

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

duck__boy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well delete any white space and the file is now being picked up, but using the code below the file that is saved contains the complete source of the page, rather than the file I wish to down load. Sorry to be a pain, I really have no experience of this at all though. Thanks. <?php header('Content-type: text/plain'); header('Content-disposition: attachment; filename=c:\\tempData.csv'); readfile('c:\\tempData.csv'); ?>
  2. I can't put it at the top of the main script as the file won't yet exist, thats why I put it in another file on it's own, but for some reason that is not being picked up. Thanks.
  3. Hey ignace, thanks for the reply. I have now got my functions firing off of a button press, so thanks for that. I'm still suffering from a lack of understanding about the other part though - First thing I do when the button is pressed is run a script that creates a temporary file on my server, and that works fine. Next I'm trying to use the help you provided to force the download of that data, and I have created a new file and placed the headers with correct names etc in the there, but when that file is called I get to following error - index_users.php is where I'm trying to control this from, and download_tempData-csv.php is where I placed the headers (and nothing else, just the headers.). I'd very much appriciate it if you were able to help further. Thanks.
  4. Hey all, I have a function that allows users to export data from a table to a .csv file. This was pretty simple and works ok, but I have two problems that I don't know how to solve. First, how would I fire this script with a button, and second how (when the button is first pressed) do I bring up a box to allow the user to select where to save the file? I realise the second query is more related to client side as opposed to server, so I'm really just after pointer of what to look for on that one. Any help would be appriciated. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.