Jump to content

Can php create new pages?


tjmbc

Recommended Posts

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

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.

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.

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.