473,386 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dynamic Meta Tags from MySQL DB

I'm searching internet and although there is lots of info on this subject I'm still not having any success, so I'm looking for some help on where I'm going wrong. (must add that I'm a novice).

I have a table "news" with fields NEW_Headline and NEW_Summary, the news.php with "include php/news.php" dynamically load each news item.

In the head tag of news.php it has a static title of "News Item" that I want to change and dynamically load the NEW_Headline as the page title and also have meta tag description using NEW_Summary.

I did find this information to add in the head section of news.php:
<title><?php echo $pageTitle; ?></title>
<META name="description" content="<?php echo $metaDescription; ?>" />

Followed with adding this to php/news.php
?php
$pageTitle = "My page title";
$metaDescription = "My page description.";
?>

I just need to add the query and results that will change the "My Page Title" to equal the individual NEW_Headline and the "My Page Description" to NEW_Summary.

Very greatful for the directions and assistance.
Oct 12 '10 #1
0 1248

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Christian Hvid | last post by:
Hello groups. I have a series of applet computer games on my homepage: http://vredungmand.dk/games/erik-spillet/index.html http://vredungmand.dk/games/nohats/index.html...
24
by: Day Bird Loft | last post by:
Web Authoring | Meta-Tags The first thing to understand in regard to Meta Tags is the three most important tags placed in the head of your html documents. They are the title, description, and...
1
by: Eric Levin | last post by:
I would like to load the Meta Tags in the page from Code: Currently they don't come up. The Source that I have: private void LoadHeaders() { DataSet oDs = new DataSet();
4
by: clintonG | last post by:
Anybody know how to dynamically write the meta tags using code so they are formatted on a separate line in the HTML source? Preferred or optimal framework classes that may be used in this regard? ...
6
by: Fred Nelson | last post by:
Hi: I'm developing a new C# Web App and I'm hoping to find a way that I can dynamically generate meta tags for the search engines at the page level. (I want to do this so that I can have someone...
1
by: rolfb | last post by:
I use ASP.net 2.0 C# for my shop-system. I want to programm dynamic meta-tags. In some books I find as memer of HtmlHead statements like Page.Header.Metadata.Add("description", "my product"); ...
16
by: Edward | last post by:
Hi All, I am having huge problems with a very simple dotnet framework web page (www.gbab.net/ztest3.aspx) , it does NOT render correctly under Apple's Safari. The DIV's do not align amd float as...
2
by: thetechturf.com | last post by:
I have some simple dynamic content pages (included below). I need to know how to add specific meta tags (ie. description, keywords, ect.), as well as extra specific header coding to a page. I would...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
5
by: Nick | last post by:
Hi there, I am adding a meta redirect tag to the page dynamically on 2 separate pages in asp.net. One of the pages it works fine, and 5 seconds after the page appears, the redirect occurs. On...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.