Hi
I've been hunting around but can't find the answer to my question, so here goes.
I've made a tool that makes css for the visitor to download based on selections made via a form. This css is held in a variable called $csscode. At the moment the only way I can figure to give it to the user is via a textarea, where they can cut and paste it.
I would rather have a link (or button) they can press that pops up the file..save as dialog (or similar) so they can save it right there. I do not want to make a file on my server, as it would quickly get clogged up.
What I thought to do was make a link like this:
<a href="givememycss.php?csscode=$csscode">Click Here to Download CSS</a>
I aslo figured that the givememycss file might need headers, maybe like this:
<?php
header("Content-type: text/css");
header("Content-Disposition: attachment; filename=usercss.css");
?>
But what else? Was my idea sound, missing something, what?
Trevor