Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Looking for some html form help...



On Mon, Oct 13, 2003 at 05:20:36PM -0400, kgleason.ma.ultranet at rcn.com wrote:
> Actually, I'm running a Windows98se peer to peer network where B0 is the
> fileserver. 
> 
> It would seem that I could do a command like:
> <FORM METHOD=POST ACTION="c:\testdata.txt"> 
> to send data collected from the form and have it directly save onto a data
> file without using perl. If anyone knows the correct procedure...I would
> appreciate knowing how.
> 

um. so you're web server is windows? Are you sure you have the right
mailing list? Even with Windows, the example you gave is still
incorrect. what the POST ACTION= thing does is specify what file
(re:script) to pass the form variables to using the POST method. 

In php you could simplly make the action a file thats sort of like:

<?

$filename="c:\testdata,txt"; //What file are you going to use.

$openedfile=fopen("$filename", "w"); //Open the file for "w"ritting

$formcontent=$_POST['formdata1']; //Assign a value to the formdata that
gets posted. Note that this formdata1 name is specified at the NAME=
line of your form field html statements. You'll need to do this and the
next line for each form field you're saving to this file.

fwrite("$openedfile", "$formcontent"); //Write the data to the file

fclose("$openedfile"); //Close the file.

?>

BTW, php works in windows as well.

Clint


> Kevin
> =======
> Original Message:
> -----------------
> From: Clint M. Sand clint at neotrance.dyndns.org
> Date: Mon, 13 Oct 2003 12:58:29 -0400
> To: kgleason.ma.ultranet at rcn.com, discuss at blu.org
> Subject: Re: Looking for some html form help...
> 
> 
> On Sun, Oct 12, 2003 at 09:08:33PM -0400, kgleason.ma.ultranet at rcn.com
> wrote:
> > Is it possible to send the results of an html form to a file as a list
> > rather to a cgi script? I have a form with six fields that I want to save
> > in a file on my network '\\b0\' [my computer is labeled 'b0']. Can you
> > suggest how this can be done?
> > 
> > 
> 
> If you're using php as your form handler, you can do this in any number
> of ways. You can mount a directory on b0 on your web server and save the
> file "locally", or use one of the built in ftp functions to get the file
> to b0, or run something like netcat as a listener on b0 and open a
> socket directly to b0 from the webserver uses one of the php socket
> functions, etc..
> 
> I can give you better suggestions if you give me some more info. What
> OS's are these two boxes?
> 
> > 
> > --------------------------------------------------------------------
> > mail2web - Check your email from the web at
> > http://mail2web.com/ .
> > 
> > 
> > _______________________________________________
> > Discuss mailing list
> > Discuss at blu.org
> > http://www.blu.org/mailman/listinfo/discuss
> 
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> 
> 
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://www.blu.org/mailman/listinfo/discuss




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org