dan_t Posted July 5, 2010 Share Posted July 5, 2010 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 More sharing options...
ignace Posted July 5, 2010 Share Posted July 5, 2010 Or is that even a good idea, security wise? Is Facebook a good idea? Just joking. Sure, I don't see any problems with this, security-wise you would need to validate any input but this goes for everything you build. Link to comment https://forums.phpfreaks.com/topic/206790-template-page/#findComment-1081467 Share on other sites More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 You want a page made for the user (user1.php,user2.php)? Is that how facebook works haha ^^^^? I thought they just have a page and used the user's id and such and used that to grab the information from the database. Link to comment https://forums.phpfreaks.com/topic/206790-template-page/#findComment-1081476 Share on other sites More sharing options...
dan_t Posted July 5, 2010 Author Share Posted July 5, 2010 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? Link to comment https://forums.phpfreaks.com/topic/206790-template-page/#findComment-1081486 Share on other sites More sharing options...
marcus Posted July 5, 2010 Share Posted July 5, 2010 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 More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.