Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

dynamic meta info - php mysql

Explorer ,
Nov 21, 2006 Nov 21, 2006
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

TOPICS
Server side applications
501
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 21, 2006 Nov 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/...
Translate
LEGEND ,
Nov 21, 2006 Nov 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2006 Nov 21, 2006
Hi David,

I've tried that and if I insert the data anywhere else it works fine - except in the meta info bit.

cheers
dave
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 21, 2006 Nov 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2006 Nov 21, 2006
Thanks David,

I cut the recordset code and pasted it above the doctype and it works perfectly now.

Cheers

Dave
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 21, 2006 Nov 21, 2006
LATEST
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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines