View Full Version : CGI scripts

14-11-2001, 08:14 PM
How can I get my website (http://www.jimton.cjb.net) to automaticly update a news.txt file insted of having to edit the .html file?

EG. I have a news section, and want to be able to have a text file that I can input recent news, and have the html file show the updated news. (That is without opening the html file and editing it).

15-11-2001, 10:27 AM
Hi James -

The title of your post says it all - what you need is some kind of cgi script or form-processing script on the server to allow you to update your content using an HTML form.

How you do this will entirely depend upon how the site is hosted - is it hosted by an ISP - and what that environment will support. It will also depend upon whether the content you publish is going to be stored in a database, or in a text file, or whether you want to update the HTML directly (but using a form to do so).

Another approach is to use something like dreamweaver, front-page etc that have FTP capability (you will need to talk to your ISP about what they support) and create the pages manually as you are doing and then ftp them up (although this is likely to be what you are doing now I guess).

I note from your site that you are using Geocities - that will limit the options that you have.

You might be able to do something with javascript though - have a form that uses javascript to stuff the data into a text file, and another that uses javascript to get the information out of the text file and place it into your page. Trouble with this approach is that different browsers support javascript in different ways, so you can (if you are not careful) wind up creating something that works in IE but not in Netscape (or vice-versa).

In general I would suggest that using Geocities is going to limit what you can do in this regard.