Newbie - Hold my hand...

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
beefsister
Forum Newbie
Posts: 2
Joined: Tue Mar 16, 2004 1:44 am

Newbie - Hold my hand...

Post by beefsister »

Hello. Okay, I need a few very basic questions answered:

1) I have been developing my company's website for about a year now (everything is static, so we have about 800 pages with a bunch of ASP incl_page scripts to keep the basic layout easy to maintain). Although the "look" is easy to maintain using the incl_page features, the content needs to be updated on a daily basis, so I am getting way behind... SO - with php/mysql, can I make like, ONE page layout and have all of the content dynamically generated by php through my mySql database?

2) If the above is possible, can it be easily maintained by my co-workers when I'm not available to do so? As you can see, I am a virgin to this... so ALL the help I can get is VERY much appreciated!!! I understan the querying functionality of SQL, I just want to know how I can setup a site with links to our products and services that can all be changed/updated easily on a daily basis. I would also like to eventually open up some e-commerce stuff... HELP!!! HELP!!! HELP!!! :(

Sincerely,

beefsister
NateVeronica
Forum Newbie
Posts: 8
Joined: Sat Mar 20, 2004 6:40 am

Post by NateVeronica »

To answer question 1. Yes you can (if willing and able) make one page layout and have all the content dynamically generated. That is, you would just need to ensure you have a place holder for your php code.

In response to the 2nd question. Let's address your virgin status first. Take a look at this post in Theory and Design:

viewtopic.php?t=18661

Umm, from there I'm sure you'll figure out a way to design an interface for your co-workers.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

I was in exactly the same boat in my first webmaster job where I had to update all website product info by hand - absolutely crazy. You definitely need something hooked up to a database.

If you have a list of product pages sharing the same layout then yes, php scripts can drop the variable content into a single html template.

Note that you don't have to serve pages dynamically: you could create scripts which simply re-write standard html files each time the database is updated. That's (theoretically) a better option since you don't have the overhead of db calls and php scripts for each http request. I say theoretically because php is pretty fast and is unlikely to be a significant factor in the speed with which pages are served. The db might be - depends on your setup. Shared hosts aren't always very good if that's what you've got?

Presumably there is an office computer somewhere with a master database: ideally what you want to do is export a csv file from that and import the file to your mysql (or etc) database. It ought to be possible to set up a simple routine which can be carried out by your co-workers. Even your boss could do it if you run through it with him/her once or twice.

The only thing you can't do is set up an ecommerce site, at least if you plan to handle credit card numbers. Php is quite capable of doing that but, unless you are an experienced programmer, you will not be aware of all the security issues. There are no shortcuts - it takes time to learn.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Depending on how much time you want to spend on creating a content management system, you could use an open source CMS written in PHP, e.g. ezPublish. There is quite an extensive list of those at http://www.opensourcecms.com/ to play with, which makes it much easier for you to choose the right package for your purposes.
Post Reply