Is it possible to query a database based on the name of the directory? So if for example i have the directory account at website.com/account, would it be possible to have a get query on the index page which gets 'account' and queries the database with 'account'
yes, just make index.php do that in /account!
There is probably a simpler way to do this using th $SERVER array, try googling "PHP $SERVER" that may get you something!
thanks, i'll google for those terms.