I'm trying to create a site for a friend, and she would like it in frames. After chatting with some people on a Yahoo group devoted to HTML, they've recommended that I use php instead.

My problem, I'm not very well versed in php. I know HTML pretty well, and can stumble around in it until I get it right. But PHP might as well be Greek (or is it "Geek?") to me.

What I want, or would like is to create a page with a header, main body and a footer. AND if possible, perhaps a side bar to the main body.

Can I do this with PHP?

I've looked through different tutorials, and so far, have not found anything that answers my specific question. So I would appreciate any and all assistance.


Al Lowe

You'll want to use PHP's include() function to include the common header, footer, and sidebar.

Is there a source you'd recommend that could help me to understand PHP a little better, such as a site or a book or something?


php.net. They even have a page dedicated to every function.

Most of your site description seems to be CSS/HTML related. I'd look in to figuring out a way to do create the site as you want it with CSS and HTML, and simplify the different pages with PHP later.

What PHP allows you to do (in a nut shell) is branch to different sections of code based upon a response or simplify maintenance by extracting duplicated code to a single source file. (You can have as many seperate files as you want.)

Smarty is usually overkill for sites like Al's. Way too much work an overhead for something that can done as easily as a couple of include files.

For larger sites, sure. But for what this member will be doing it will obviously be overkill plus something far too complex to set up.