...

View Full Version : writing a file via form



joan
07-12-2002, 11:26 AM
Hi!

I need to write a file (append data) from a form fields in a intranet enviroment. After this file must be read it in excel.

I suposse it can be done with databases (coldfusion, asp). Is there any cheap and easier solution?.Have you any sugestion, tutorial, link or idea ?

Thanks in advance

Joan

firepages
07-12-2002, 11:36 AM
if you can get PHP set up on your server (PHP is free for win or *NIX)




<?
while(list($key,$var)=each($_POST)){$yak .=$var.',';}
$yak .="\r\n";
$fp=fopen('file.csv','a+');fputs($fp,$yak);fclose($fp);
?>


is simplistic but does the job.

joan
07-12-2002, 12:10 PM
Thanks firepages !

I know yor solution is good. But in my case, I have not PHP on the server (and the most important... I have not idea about PHP, only javascript -I know it's not so much...-)

see you

joan



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum