Jump to content

Template Page


dan_t

Recommended Posts

I know this is a rather vague, open-ended question, but how would you go about having a template page where once a person filled out a form and the data is entered into the database a page would be automatically made for that user?

Or is that even a good idea, security wise?

If you have a decent contrived example, that would be helpful.

Dan

Link to comment
https://forums.phpfreaks.com/topic/206790-template-page/
Share on other sites

Facebook works off modrewrite for people who have a custom URL, or for people who don't have a custom URL they have a "profile.php?id=xxx"

 

If you wanted to have a new page "created" for each user and have it like http://site.com/USER1.php http://site.com/USER2.php you could just use modrewrite instead of actually creating the page.

Link to comment
https://forums.phpfreaks.com/topic/206790-template-page/#findComment-1081488
Share on other sites

You want a page made for the user (user1.php,user2.php)?

 

Not sure - What would be the best way?

I have a profile page made. Last time I did do individual pages, but that was a pain!

I suppose there's no good way to do that is there? Mainly because of naming pages?

 

But I don't see why you would want to do that...

 

Simply get the user's ID and use a $_GET...

 

user_page.php?userid=1

user_page.php?userid=2

user_page.php?userid=3

 

 

 

then use mod-rewrite to rename it to something else

Link to comment
https://forums.phpfreaks.com/topic/206790-template-page/#findComment-1081489
Share on other sites

Archived

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

×
×
  • Create New...

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.