- Jan 18, 2002
- 5,893
- 0
- 76
Hi, all. First post in this forum, but I've got a question that I'm hoping someone here knows the answer to. I'm working on a website that will be updated somewhat frequently with news posts, not just by myself, although the site is being hosted on my webspace. Rather than giving other people access to my space, I want them to be able to post news, as well. In school this last year, we did a little bit of programming in Perl and did a little bit of work with CGI scripts. What I'm wanting to do is code a few programs that will allow these users to login with a username and password and then post news on the main page of the site. I will be writing it in Perl, since that's what I know.
I've been thinking about it and I'm not sure about how to approach a particular aspect of the problem. I want to execute a program right away (i.e., when the site loads up) that will go into my directory structure and retrieve X number of news posts and then generate the main page of the site based on what data was retrieved from the file. My question is this: How do I cause this program to execute when the site loads, rather than having to have the user do something to start execution of the program? The only thing I've come up with so far is to use the onLoad attribute of the HTML BODY tag and have that execute the program, but I don't know if that will do what I want it to do. Any help would be most appreciated.
I've been thinking about it and I'm not sure about how to approach a particular aspect of the problem. I want to execute a program right away (i.e., when the site loads up) that will go into my directory structure and retrieve X number of news posts and then generate the main page of the site based on what data was retrieved from the file. My question is this: How do I cause this program to execute when the site loads, rather than having to have the user do something to start execution of the program? The only thing I've come up with so far is to use the onLoad attribute of the HTML BODY tag and have that execute the program, but I don't know if that will do what I want it to do. Any help would be most appreciated.
