Dynamic user data, all using the same pages
Posted: Mon Dec 05, 2005 12:35 am
Ok so I have a personal site where I have a blog and other database polled information displayed. Out of curiousity and a bit of nudging I would like to be able to have a site for my little lady to be displayed at http://www.mypage.com/hername. I want it to use all the same files I use for my page for easier maintainability. Here's what I've got so far:
main (folder)
--hername (folder)
----index.php (includes the main folder's index.php and sends a user name SESSION variable along with it)
--index.php
--blog.php
--otherstuff.php
Now this works great for the index.php page but not as well for the blog.php page. I would have to make a dummy page for each real page I wanted to include in her folder which seems silly. It wouldn't be so bad if it was as easy as this example looks but the blog page alone has about 4 other pages that go along with it for commenting, adding, and deleting blogs. Add that up with all the other pages I've got for my site and it's quite the chore. Most importantly, to me, though is the fact that I just don't feel like that would be the best solution. Someone's got to have a much more elegant way of doing this. I'm probably overthinking the whole thing. Thanks if advance for the input.
main (folder)
--hername (folder)
----index.php (includes the main folder's index.php and sends a user name SESSION variable along with it)
--index.php
--blog.php
--otherstuff.php
Now this works great for the index.php page but not as well for the blog.php page. I would have to make a dummy page for each real page I wanted to include in her folder which seems silly. It wouldn't be so bad if it was as easy as this example looks but the blog page alone has about 4 other pages that go along with it for commenting, adding, and deleting blogs. Add that up with all the other pages I've got for my site and it's quite the chore. Most importantly, to me, though is the fact that I just don't feel like that would be the best solution. Someone's got to have a much more elegant way of doing this. I'm probably overthinking the whole thing. Thanks if advance for the input.