MySQL Forums
Forum List  »  PHP

php w/mysql backend. Getting a layout to work with the db selected info
Posted by: Adam
Date: May 06, 2006 03:47PM

Ok, I am sorry if I can not express this in the proper terminology, but I am completely and utterly new to this.

I have a seperate php file just for the template of the site. Any specific page information (title, keywords, content) is an echo of $title, $keyword, $content, etc.

However, I am having some problems. How do I set the information stored in my db to these?

I have tried it previously in a example similar to the following:

Main page is set up like this -

call db
select info, etc. from table
include template file
close db


The problem with this is that it prints the information above the template. I really do not want to split the template up into seperate files. Is there any way to get this to work without having to make a header and footer template system like so many sites say?

I am sorry if I am a little confusing. If there is anything that seems odd, please ask and I will try to better phrase and elaborate on.

Thank you for any help that can be given!

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.