MNPages Test Oven

mmmmm.... now that's good website

Random Quote

This Random Quote generator is based on some code I originally did in javascript to display a random quote in the footer of my site. As I learned php, I re-wrote it using it instead. It is a pretty basic script and called by putting random_quotes(); in a code block or into a template index file.

The quotes are in a simple array in the include.php file and at this time have to manually be edited. As you can see from the example, you do not need to put in just quotes, any random bit of text can be included.

Refresh the page to have a "new" quote displayed.


The words printed here are concepts. You must go through the experiences. - Carl Frederick

I have used this coding as part of my personal site, upmykilt.net, for years now - and originally converted it to a WB Snippet for use on that site. As I learn more about Website Baker I hope to turn this in to a full-fledged module that will seperate the quote from the source, allow formatting of the quote and source text seperately, and keep the items in the database and allow editing from the admin panel.