Active Server Pages

Active server pages are web pages that your web server creates on the fly. This site, the Web Builders' Toolkit, uses active server pages. If we'd wanted the Toolkit to be a regular site, we'd need a page for fonts, a page for color, and so on, all down the list. When you click on a link, you'd tell the web server, in effect, "give me this page about fonts," and the web server would send you the page you identified. The page itself never changes (until you edit it, which most of us do all too seldom).

With active server pages, you tell the web server, in effect, "give me this page, and I want the page to be about fonts, so give me the introduction to fonts you have in your database and all the font links you have in your database."

Since we're extremely lazy, that's the way we did it. In fact, we're so lazy we made one web page do the work for this whole web site. Depending on which link you click (which determines what you tell the web server), the page you're looking at will be filled with information about fonts, colors, or (in this case) active server pages.

Let's get down to the nitty gritty just a little bit. Look at the URL of this page in your web browser. First, you'll notice that the name of the page is index.php instead of index.html. That means we're using the PHP active server page scripting language. As you've wandered around the web you've probably noticed some pages called whatever.asp or whatever.cfm. Instead of PHP, those pages use Microsoft Active Server Page and Cold Fusion, respectively.

Tacked onto the very end of the URL for this page is a question mark and the characters "cat=active_page". Go up to the line where your web browser displays the URL and change "active_page" to "fonts" and press Enter. If you aren't reading this sentence, it's because we forgot to ask you to come back once you'd seen what changing the URL did. Oh well.

You need basically three things to make active server pages work: a web server, a database, and a scripting language. It used to be that databases were expensive, well beyond the reach of normal human beings. Some still are. But open source databases like MySQL, web servers like Apache, and scripting languages like PHP make it possible for cheapskates like us to have active server pages. Now all you need to invest is the time to learn how your active server scripting language and database work and maybe a couple of extra bucks for a web host that supports databases and active server pages.

Now imagine you had to write the PHP code to make this website work. Your code would grab the characters after the "?cat=" ("fonts" or "active_page" or whatever) out of the URL, and then it would look through your database for all the links that matched that code and print them neatly on the web page. That's pretty much it.

Now we won't try to kid you. This is like programming, and if you know programming isn't for you, you can just admire what we're doing. But if you don't mind a little programming, you'll find PHP is a lot of fun to play with. If you're interested, here's the code that makes this page work.

Once again in our links we're going to talk about things we know: Apache (the web server), PHP (the scripting language and active server glue) and MySQL (the database). That doesn't mean we think they're better than the alternatives. They're just what we know. You can find out about other technologies in your favorite search engine.

A Gentle Introduction to SQL
Lovely fill-in-the-blanks learn-by-doing site where if you finish the examples, you'll know way more SQL than most people who build PHP/MySQL sites.
Mike Chirico's MySQL Tips
These tips are directed toward more advanced MySQL users. Certainly if your grasp of MySQL, like ours, is pretty much restricted to the SELECT statement (yes, you can actually run a PHP/MySQL website and not have to know much more than that), you'll find them pretty advanced, but these tips look like they'll untie some pretty tricky knots you might run into down the road.
EasyPHP
We really aren't kidding: you can run the Apache web server, the PHP scripting language, the MySQL database, and the indispensible PHPMyAdmin database front end on your Windows machine. Not stripped down versions, the real thing. EasyPHP packs the whole works together into one easy to install package, tied up in a pretty bow. We have some advice about other utilities you might want to use and a similar package, phpdev, elsewhere on our website. We aren't listing phpdev here because it hasn't been updated in a while, but it still works fine! And you can't possibly have a more pathetic computer than the one we used to run a database with over 30,000 records. It was slow, but it worked, and it sure was nice to be able to debug it at home and not put it out on the website until it was finished.