Jump to content

Need Help Exporting txt file


DrTrans

Recommended Posts

So what im wanting to do is this:

 

I have a directory inside my htdocs folder on my local server  called "apps"

 

When an APP is processed into the Mysql database and stores the values of the application form i want it to generate a "txt" file and put it in the folder called /htdocs/apps

 

The filename needs to done by $lastname-$fname.txt

 

and have all the variables inside the txt file.

 

$myFile = $lastname-$fname".txt";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $stringData);
fclose($fh);

 

Im never messed with fwrite() I have about 80 variables i need to make it write out in each indivudal file.

 

 

Thanks for your help in advance. Very newb to fwrite.

Link to comment
https://forums.phpfreaks.com/topic/201641-need-help-exporting-txt-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.