View Single Post
Old 09-06-2021, 07:29 AM  
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,123
One last bump for this project as I have a related question...

What is the function called to be able to add certain data entries as I guess 'tags' for want of a better word without knowing the correct term?

What I'm trying to do is to include some of the SQL data to display in the HTML meta tags, so for example, it would pull the data from the row for the 'RecipeName' column and in the meta tags I'd like to put a snippet of code like below:

PHP Code:
<meta name="Keywords" content="Simple recipe for <?php include "RecipeName"?>" />
<meta name="Description" content="<?php include "RecipeName"?> recipe ingredients" />
Which would display...

<meta name="Keywords" content="Simple recipe for Cake" />
<meta name="Description" content="Cake recipe ingredients" />

Just trying to give this project a little SEO advantage, what is the function called that I need to use in order to do something like that in the template pages, that pulls directly from the SQL database for the RecipeName based on the same RecipeID in the URL?

TIA
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote