Page 1 of 1

php to write entire pages?

Posted: Sun Apr 19, 2009 9:56 am
by nicademus
Hello all!
I think this is possible:
I want to write a script that will create a new webpage from a template and the document to a folder on the server. Where do I need to start to do this? I have the "template" page created which I will be using for all the subsequent pages.

This is what I think I need:

A script to insert the new page's information form the database
A script to save the template as a page in a folder on the server
And a script that will save the url into a database to be used to link to the page form another in the site.

I think all of these can be incorporated as a single script to help write the pages but I am not sure.

This is the first endeavor of mine with php so I am still learning the basics.
Thank you for any help that may be given.

Re: php to write entire pages?

Posted: Mon Apr 20, 2009 8:22 pm
by nicademus
The content for each page will only change about once a year and only for certain pages. I will be adding about 5 pages a week. The site is to be a directory of companies. Basically, I was thinking of setting up a script that will insert the new company's name through a form to have the existing php template have the new content in it. The content of course will have already been uploaded to the DB. I was trying to figure out a way to allow my fiance to publish pages after I get the content uploaded. I would give her the list of company names and she can type each in.

Each time the script runs I would like it to add the page to the site and save its URL to a database. This URL is used to link from a "category" list of companies to a dedicated company page. All while keeping the template ready for the next use.

I hope that makes sense. This may be out of my range of knowledge at the moment but I thought I would see what it would take.

Thanx!

Re: php to write entire pages?

Posted: Fri May 01, 2009 2:37 pm
by nicademus
Cool! That helps me immensely! Now I have a place to start :)

THANX!!!!