Learn to make a random quote of the day. View the demo to see the result.
Intro:
Since you now are an expert on using files after lesson 4 (the Guestbook), let's make something a little bit more fancy. I often see people having a "tip of the day", or a "quote of the day", and I thought I should try to make a VBScript variant. It reads the quotes from a text file (for easy maintenance), and displays it.
The code:
Let's start coding! First make a text file in a directory. Fill it with your quotes, one on each line. To make it easier later on, add the number of quotes (lines) on the first line (alone). Now your text file will look something like this
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Oct 10, 2006 Hits: 3 Rating: 0.00 Votes: 0