Jump to content


This topic is now archived and is closed to further replies.


Creating php pages on the fly.

Recommended Posts

I am creating a website for travel journals. A user signs up and they get their own mini website that contains a journal, photo album and map. I am having a problem. When a user signs up, the pages of their website are copied from a default folder to their own folder. The problem is, i am not sure how i can embed thei user id into the pages on the fly so that when someone opens their website, the page retrieves journal entries and photo albums that are linked to their user id.

Does anyone know how i can go about this? Just to make it clear, i am trying to create pages or copy pages on the fly, but they need to contain a user id but i am not sure how to get the user id embedded into the page if each page is just copied from a default.


Share this post

Link to post
Share on other sites
I am doing something similar to this. I'm not sure if this will help, but I'll try to make a suggestion.

I have a page that is being used as a template to output different games. What I am doing is putting the name of the game in the URL such as


I'm sure you probably have a Session variable with the user name is it, so you could even use the session variable to define what the name is in the URL. Now on the template page, you can say:

[code]$name =$_GET['id'];[/code]

and then pull from your database where the name is equal to the user name assuming you are using the id as the username. Hope that helps.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.