tjmbc Posted June 10, 2008 Share Posted June 10, 2008 I've been using a single dynamic page to show content and I would prefer to use a separate page. For instance: A user submits a form with their name. Rather than displaying the name in say, the title dynamically: <title><? echo $user['name']; ?><title> I would like a new page like this: <title>John Doe</title> Can php do this? Link to comment https://forums.phpfreaks.com/topic/109630-can-php-create-new-pages/ Share on other sites More sharing options...
discomatt Posted June 10, 2008 Share Posted June 10, 2008 Check out fopen and file_put_contents Link to comment https://forums.phpfreaks.com/topic/109630-can-php-create-new-pages/#findComment-562385 Share on other sites More sharing options...
DarkWater Posted June 10, 2008 Share Posted June 10, 2008 Sorry for being blunt, but why the hell would you do that? You can make them feel special and "have their own URL" with mod_rewrite, but you're wasting space by hard-coding a name into title tags. Link to comment https://forums.phpfreaks.com/topic/109630-can-php-create-new-pages/#findComment-562402 Share on other sites More sharing options...
discomatt Posted June 10, 2008 Share Posted June 10, 2008 Sorry for being blunt, but why the hell would you do that? You can make them feel special and "have their own URL" with mod_rewrite, but you're wasting space by hard-coding a name into title tags. He was using that as an example. I can think of many reasons you would want to create a static page... one is efficiency. If the data rarely changes, you're far better using a static page. Link to comment https://forums.phpfreaks.com/topic/109630-can-php-create-new-pages/#findComment-562408 Share on other sites More sharing options...
DarkWater Posted June 10, 2008 Share Posted June 10, 2008 Sorry for being blunt, but why the hell would you do that? You can make them feel special and "have their own URL" with mod_rewrite, but you're wasting space by hard-coding a name into title tags. He was using that as an example. I can think of many reasons you would want to create a static page... one is efficiency. If the data rarely changes, you're far better using a static page. When you're using something like $user['name'], I can bet that it'll change based on whoever is connecting, hence the mod_rewrite comment. Intelligently caching near-static files is a different story. Link to comment https://forums.phpfreaks.com/topic/109630-can-php-create-new-pages/#findComment-562411 Share on other sites More sharing options...
discomatt Posted June 10, 2008 Share Posted June 10, 2008 As he stated, $user['name']; was an example Link to comment https://forums.phpfreaks.com/topic/109630-can-php-create-new-pages/#findComment-562415 Share on other sites More sharing options...
DarkWater Posted June 10, 2008 Share Posted June 10, 2008 So how about we stop talking hypothetically and actually get real information from the thread starter? =/ Link to comment https://forums.phpfreaks.com/topic/109630-can-php-create-new-pages/#findComment-562417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.