# Automatic Website Update



## overbydt (Jun 20, 2002)

This is probably a basic question, but I'm stumped. I operate a church website and the front page has a list of upcoming events for the next week or so. I would like to automate the page so that the events would display on their own without me having to go in and manually update it each week. Is there a way to build a database or list and have the page go out and grab the events for certain dates, then have it drop those events after the date has passed?


----------



## ptvGuy (Apr 20, 2004)

Yes, I do it all the time. It's part of creating a dynamic page. However, it isn't exactly something easily explainable to a beginner. Why don't you start by letting us know your level of expertise, what software you have available to work with, and the type of server your site is hosted on. All of this makes a difference.


----------



## overbydt (Jun 20, 2002)

I'm a real novice when it comes to HTML, although I can paste code with the best of 'em. I'm using the WYSIWYG editor available in Microsoft Word, which I think is a shrunk-down version of Frontpage. Our site is being hosted by our ISP on an FTP server, and I use WS_FTP to access it.


----------



## ptvGuy (Apr 20, 2004)

Okay, first of all, MS Word is not, by any means, a scaled down version of Frontpage. MS Word is a Word Processor with delusions of being a web editor. MS Publisher has even grander delusions of being a web editor. Try typing the word "Hello" with no formatting in a blank Word document and saving it as an HTML page. Open that page in a browser window and then view the source code. You'll see a hundred plus lines of garbage Word code for a page that needed five or so lines of very basic code.

Database integration into a web site is very dependant on the server your site is hosted on (Unix, MS Windows Server) and the services that have been made available to you for your site. Just as a general rule (though there are exceptions) Unix servers tend to support MySQL databases with PHP pages doing the access, and Windows servers tend to support MS Access databases with ASP pages doing the access. These are very different utilities with very different methodologies.

I think that a better answer for your needs would be to use SSI (Server Side Includes) Directives. These are directives placed in a document that tell a server what to include in that document before it's ever sent to a user's browser. Try the following:

Open a plain text editor (like Notepad), cut and paste the following code into the document, and save it as "test.shtml":

```
SSI Test

xxxxxx
```
Afterward, FTP that file to the root directory of your site and access it through your browser. If the page comes up with an error message or a plain page with just six x's in a row, then your server does not support SSI. If, however, it comes up with a date/time stamp with three x's on each side, then it does support it and we can go from there.

A quick way to check on your server type (if you'd rather not just ask them) is to see how it handles a 404, Page Not Found Error. Go to the address bar of your browser, type in the URL of your website, type a forward slash as if you were going to access a subpage or subdirectory, and then type a bunch of garbage characters. A windows server will return a "The page cannot be found" error page with a link to the root directory of your site in the middle of the page and a link to Microsoft Support at the bottom. A Unix server will give you a smaller "Not Found" error with a bunch of information on the specific Apache version of the hosting server and a link to your root directory at the bottom.

By the way--if you're still reading this very long post--I'd recommend using Notepad over MS Word for web editing. You can even download some fairly useful, free web editors from ZDnet. Pretty much anything is better than using Word for web pages.


----------



## overbydt (Jun 20, 2002)

OK, the test.shtml works. And I'm attaching a screenshot of the error page.


----------



## BMoCore (Dec 29, 2005)

overbydt said:


> OK, the test.shtml works. And I'm attaching a screenshot of the error page.


Your test never ran. Error 404 means the file (test.shtml) was not found. The test is only determining pass/fail on the basis of whether you see a date between the X's or not.


----------



## overbydt (Jun 20, 2002)

No the test DID run, I got the date between the Xs. ptvGuy wanted to know what the error page looks like, so I posted a picture of the page.


----------

