View Single Post
Old 09-06-2021, 03:24 PM  
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,123
This is what the top of the HTML looks like presently on my test page:

PHP Code:
<?php
session_start
();
(
"mysql:host=localhost;dbname=database""user","password");
    
$table "Recipes";

$metasettings = @mysql_fetch_assoc(@mysql_query("SELECT * FROM $table WHERE RecipeName, RecipeDescription, Author"));

$title $metasettings['RecipeName'];
$description $metasettings['RecipeDescription'];
$random_tags $metasettings['Author'];

?>
<!DOCTYPE html>
<head>
<base href="https://gfy.com/" /><!--[if IE]></base><![endif]-->


    <meta charset="UTF-8"/>

    <title><?php echo $title?> Recipe</title>
<meta name="Description" content="<?php echo $description?>">
<meta name="Keywords" content="<?php echo $title?> Recipe Ingredients Make <?php echo $title?> Recipes">
    <link rel="stylesheet" href="style.css" type="text/css"/>
What I'm trying to do in the SQL data is to add the 'RecipeName', 'RecipeDescription' and 'Author' rows as meta tags.

The page is called by URL like this:

PHP Code:
recipes.php?id=34 
The recipes.php works perfectly, I just cant get this row data showing in the metas where I want them to, once I get this part working I can secure the id= stuff and set the site live, hopefully

Hope that makes sense than my rambling posts earlier
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote