lifeasalounge Posted September 26, 2006 Share Posted September 26, 2006 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.Thanks. Link to comment https://forums.phpfreaks.com/topic/22063-creating-php-pages-on-the-fly/ Share on other sites More sharing options...
livepjam Posted September 26, 2006 Share Posted September 26, 2006 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[code]www.mysite.com/page.php?id=name[/code]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. Link to comment https://forums.phpfreaks.com/topic/22063-creating-php-pages-on-the-fly/#findComment-98715 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.