right, i have the meta tags for a site i am designing in my db and i have
PHP Code:
<?
include("./admin/config.php");
$connection = mysql_connect($host, $username, $password) ## connect to server
or die ("Couldn't Connect To MySQL Server....");
mysql_select_db($db)
or die ("Couldn't Select Database...."); # connect to DB
#######-- Variables To Be Collected --########
$sql = "SELECT * FROM ru_config";
$result = mysql_query($sql)
or die ("Couldn't Execute Query");
$row = mysql_fetch_array($result);
$sitename = $row[sitename];
$siteurl = $row[siteurl];
$site_logo = $row[site_logo];
$slogan = $row[startdate];
$adminmail = $row[adminmail];
$foot1 = $row[foot1];
$foot2 = $row[foot2];
$foot3 = $row[foot3];
$copyright = $row[copyright];
$Version_Num = $row[Version_Num];
#######-- Meta Tags --#######
$sql = " SELECT template
FROM ru_site
WHERE template_id = '1'";
$result = mysql_query($sql)
or die ("Couldn't Execute Query");
$row = mysql_fetch_array($result);
$meta = $row[template];
but the meta tags have variables in them
<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=\"._CHARSET.\"\">
<META HTTP-EQUIV=\"EXPIRES\" CONTENT=\"0\">
<META NAME=\"RESOURCE-TYPE\" CONTENT=\"DOCUMENT\">
<META NAME=\"DISTRIBUTION\" CONTENT=\"GLOBAL\">
<META NAME=\"AUTHOR\" CONTENT=\"$sitename\">
<META NAME=\"COPYRIGHT\" CONTENT=\"Copyright (c) 2003 by $sitename\">
<META NAME=\"KEYWORDS\" CONTENT=\"\">
<META NAME=\"ROBOTS\" CONTENT=\"INDEX, FOLLOW\">
<META NAME=\"REVISIT-AFTER\" CONTENT=\"1 DAYS\">
<META NAME=\"RATING\" CONTENT=\"GENERAL\">
<META NAME=\"GENERATOR\" CONTENT=\"Reunite - $copyright\">
i know i need to eval tham but i am not sure how to do it right.... (any tips for cleaning the code will be appreciated too....)