CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
How to store in a text file



Nov 7, 2000, 1:10 AM

Post #1 of 3 (142 views)
How to store in a text file Can't Post

Hi all
I am getting a data from a text file and putting it in a .CGI file. if the user modifies the data of the text box contents and then if the user clicks the Submit button,the text contents in the text file should change. How to do this?
Plz let me know
thanks in advance


Nov 7, 2000, 11:45 AM

Post #2 of 3 (142 views)
Re: How to store in a text file [In reply to] Can't Post

You'll have to read the data base again everytime they submit their information, or you could just destroy the data that's in the file and overwrite it with what is in the form fields everytime they hit submit. That make the most sense. If all of the information that is going to go into the data file is shown to them in the form, then why not overwrite the data base everytime. Then weather or not they changed the contents it won't matter because if they did it will change the data base, and if they didn't it will overwrite the data base with the same information. Ot overwrite a data base do this,

open(data, ">data.CGI");
print data "$form{'stuff'}";



Nov 7, 2000, 6:44 PM

Post #3 of 3 (142 views)
Re: How to store in a text file [In reply to] Can't Post

Hi Sleuth
I'll Work out and see. Thanks for the info Sleuth
Karthik K


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives