Skip to main content
Inspiring
November 21, 2006
Answered

dynamic meta info - php mysql

  • November 21, 2006
  • 1 reply
  • 500 views
Hi Folks,

I'm trying to create a page that gets its meta info from a database but when viewed through a browser I just get no info listed at all;

here's the code:

<meta name="keywords" content= "<?php echo $row_rs_course_notes['keywords']; ?>">

<meta name="description" content="<?php echo $row_rs_course_notes['description']; ?>">

can anyone help me by explaining why it doesn't work?

Cheers

Dave

This topic has been closed for replies.
Correct answer Newsgroup_User
mac-in-the-mountains wrote:
> I've tried that and if I insert the data anywhere else it works fine - except in the meta info bit.

There's nothing obviously wrong with the code. If it's not working in
the meta tags, it sounds as though your recordset code is below the
document head. However, that's very unusual, because Dreamweaver inserts
all the necessary code above the DOCTYPE.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/

1 reply

Inspiring
November 21, 2006
mac-in-the-mountains wrote:
> can anyone help me by explaining why it doesn't work?

You need to check that your recordset is producing valid results.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Newsgroup_UserCorrect answer
Inspiring
November 21, 2006
mac-in-the-mountains wrote:
> I've tried that and if I insert the data anywhere else it works fine - except in the meta info bit.

There's nothing obviously wrong with the code. If it's not working in
the meta tags, it sounds as though your recordset code is below the
document head. However, that's very unusual, because Dreamweaver inserts
all the necessary code above the DOCTYPE.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Inspiring
November 21, 2006
mac-in-the-mountains wrote:
> Thanks David,
>
> I cut the recordset code and pasted it above the doctype and it works perfectly now.

Strange that it should have been lower down the page in the first place.
But problem solved, and that's what matters. :)

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/