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
