Forum Moderators: coopster

Message Too Old, No Replies

PHP Dynamic Meta Tags

Is this a good idea?

         

wfernley

2:29 pm on Aug 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello.

I want to add meta tags to my site. I have roughly 50 pages, 150 including category and product pages. All Dynamic of course - using includes.

I want to setup meta tags on each page and I was hoping to do them through a database. I was hoping to have the metatags created like this: <META name="description" content="<?=$description?>"> - Where $description is a query from my DB where my description for that page is located.

My MySQL DB table called page_metatags would be designed like this: page_id int(11) auto_inc, page_name varchar(255), page_description varchar(255), page_keywords varchar(255).

So I would have an id for each page, keywords, description and I would have the page_name which would be the page like products.php.

Do you think this is a good idea?
It is just an idea I have and I thought to myself it would be a good idea because I already have my <HEAD> tag automatically generated from the DB for the <TITLE> tag. It also contains any Javascripts.

Thanks in advance for your help :)

Wes

ergophobe

2:58 pm on Aug 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You're currently doing a query that gets your title, javascript and other info in the head, correct? In that case, the overhead and additional coding to get meta tags from the DB will be minimal, so sure.