473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

How to write form to file

breagan1
I have created the following form (layout not tweaked yet). It sends out to email but I haven't figured out how to also have it write the form results to a tab deliniated text file. I've tried several codes. This is for a nonprofit site I work on.

Here's the link to it:
http://www.nysboc.com/cgi-bin/conference.cgi
Any help would be greatly appreciated.

Code Attached.
Attached Files
File Type: txt conference.txt (11.6 KB, 12435 views)
Jun 15 '07 #1
4 1685
acoder
16,027 Expert Mod 8TB
Is this text file on the server?
Jun 16 '07 #2
It is in my /cgi-bin/data folder. It doesn't have to be a text file, I just want to be able to output to a file that I can then use to bring the data in to Excel or Access.
Jun 17 '07 #3
acoder
16,027 Expert Mod 8TB
In that case, I think you'll find better help in the Perl forum (to which I've moved this thread).
Jun 18 '07 #4
KevinADC
4,059 Expert 2GB
basic method for appending/writing data to a file:

Expand|Select|Wrap|Line Numbers
  1. open(FH, ">>path/to/filename.txt") or die "Can't open path/to/filename.txt: $!";
  2. print FH "stuff you want to print here";
  3. close FH;
The code you posted is fairly ancient perl code. Using the CGI module would be a better solution, that way you can at least use some basic security such as disabling file uploading and limiting the amount of data that can be sent via the form. The script you have looks like it will work but you may run into problems if bots start sending spam or malicious users try sending junk to the server.
Jun 18 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Thomas | last post by:
What's the quickest way to write and read 10.000 integer values ( or more ) to and from a file? Using struct somehow? The example in the docs shows how to handle to or three arguments, but is the...
5
by: anas.hashmi | last post by:
I am trying to write to the beginning of a file. The reason: I want to make a form where board webmasters can use it to insert in updates to a webpage without having to go directly into the web...
5
by: Sumana | last post by:
Hi All, We developed our project on VC++.Net console application to create image of disk and to write the image We are having problem with reading and writing the sector beyond 6GB Disk or...
11
by: Vmusic | last post by:
Hi, I am trying to write out an array of string variables to Notepad. I can't get SendKeys to accept the string variable only literal quoted strings. I DO NOT want the hassle of writing to a...
2
kamill
by: kamill | last post by:
i need to write content of one text file into another text file. My code is working ,if i choose both files from same directory where my program reside..BUT,its not working if i select files from...
0
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
3
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
0
by: wender1 | last post by:
Hello all. I was wondering if someone knows how to pass data from a PHP form to update a XML file. for example: I need a form to upload a picture, generate a thumbnail, write a description...
1
by: nufanvandal | last post by:
Hello, I created a web form in html, I need to create a server-side script using ASP and embed it into the html, so that when the user clicks submit, it sends(saves) the data from text boxes,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.