index.html or web page generator

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
TechMansoor
Forum Newbie
Posts: 1
Joined: Thu Feb 05, 2009 3:13 pm

index.html or web page generator

Post by TechMansoor »

Hello everyone. I hope the wind is blowing well for everyone that I do. Indeed, I'm looking to create a page generator. Basically, I want to make a small form, and once the form is submitted, firefox or ie will produce an index.html. Index.html will be the simple page I created along with their text added from the form in specific locations of index.html.

I'm new to php scirpting but have a little experience. Can anyone reference me somewhere, where I can easily figure it out, or possibly allow me to see some code that can get me started?

an example of what I'm trying to do is here:

infomillionaire.com/lpg

Thanks a lot guys.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: index.html or web page generator

Post by requinix »

This basic idea is called templating. You create the template, something fills it in.

Create your file and put something special where you want stuff to get inserted. Like

Code: Select all

Hi {NAME}. You downloaded this file on {DATE} at {TIME}.
Then the PHP file that receives the form data reads in the template and replaces each "token" with the right data.
Then you let the user download the file (example #1).

Try that and if you get stuck post your code and explain what the problem is.
Post Reply