This problem is two-fold. One is easy the second one more difficult.
Maybe I missed it but, when I try to create a text file using the below PHP script, I get "Permission denied." Here is the code:
<?
$filename = "mydata.txt";
$newfile = @fopen($filename, "w+") or die("Couldn't create file.");
fclose($newfile);
$msg = "<P>File created!</p>";
?>
What am I not doing? When I connect to a database I have to type in my username and password like so:
$connection = mysql_connect("localhost", "username", "password")
or die("Couldn't connect.");
but what is the code to create a text file? I've been trying different things for 4 hours now.
Part two,
Anyone have any idea how to take the contents of a table and place it into a text file for downloading into Excel or Access?
Please help. I have wasted a perfectly rainy Saturday.
I don't care about part two as much as part one. It's driving me nuts!!!!