a much simpler way would be to make a wildcard for you domain in bind, and then in your httpd.conf file, specify where * points to. that way you only need to make those two mods and you can have unlimited subdomains without having to add entries to your conf files.
i have tested out an example for you to make sure i got all the bind config and apache config correct.
//this is all i added to my /var/named/drew-phillips.com.db file
* 14400 IN CNAME drew-phillips.com.
//and i added this on top of my normal virtual host entry in httpd.conf
<VirtualHost 63.247.65.34>
ServerAlias *.drew-phillips.com
ServerAdmin [email]drew@drew-phillips.com[/email]
DocumentRoot /home/drew010/public_html/scripted
User drew010
Group drew010
ServerName *.drew-phillips.com
User drew010
Group drew010
CustomLog domlogs/drew-phillips.com combined
</VirtualHost>
so once you have those two things in place, you have wildcards enabled. in the case of my virtualhost entry, all hits to whatever.drew-phillips.com, will read from /home/drew010/www/scripted/
so i made an index.php in /scripted and put this in it.
<?php
$domain = "drew-phillips.com";
preg_match("/(.*)\.$domain/i", $_SERVER['HTTP_HOST'], $matches);
echo "You are viewing the subdomain <b>" . $matches[1] . "</b> right now.";
?>
and if you actually test it. http://phpbuilder.drew-phillips.com the php extracts the subdomain from the url.
and from that point, you can determine how you want to write your subdomain prog. i would guess when users sign up you save their subdomain name in the db, so when it is hit, you run a query from that page, retrieving the given url for the subdomain viewed and then redirect.
simple as that!