Jump to content


Photo

Creating php pages on the fly.


  • Please log in to reply
1 reply to this topic

#1 lifeasalounge

lifeasalounge
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 26 September 2006 - 03:04 AM

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.

#2 livepjam

livepjam
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 26 September 2006 - 03:15 AM

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

www.mysite.com/page.php?id=name

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:

$name =$_GET['id'];

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users