Ok, I'm trying to make my html template a mysql query. I'm having problems though...
I use the following code as my header.php now:
<?php
include("db_connect.php");
$result = mysql_query("SELECT * FROM site_info");
$myrow = mysql_fetch_array($result);
$result2 = mysql_query("SELECT * FROM links");
$myrow2 = mysql_fetch_array($result2);
$result3 = mysql_query("SELECT * FROM header");
$myrow3 = mysql_fetch_array($result3);
$result4 = mysql_query("SELECT * FROM templates");
$myrow4 = mysql_fetch_array($result4);
?>
<html>
<head>
<TITLE><?php echo "$myrow[title]" ?></TITLE>
<meta name="AUTHOR" content="Jason R. Churchill, (<?php echo "$myrow1[admin_email]" ?>)">
<meta name="COPYRIGHT" content="<?php echo "$myrow[copyright]" ?>">
<meta name="DESCRIPTION" content="<?php echo "$myrow[description]" ?>">
<meta name="KEYWORDS" content="<?php echo "$myrow[keywords]" ?>">
<meta name="TITLE" content="<?php echo "$myrow[title]" ?>">
<SCRIPT language=Javascript src="<?php echo "../$myrow%5Bsite_url%5D" ?>/scripts/fade.js"></SCRIPT>
<style>
a:link {text-decoration: none; color: <?php echo "$myrow3[link]" ?>}
a:visited {text-decoration: none; color: <?php echo "$myrow3[link]" ?>}
a:active {text-decoration: none; color: <?php echo "$myrow3[link]" ?>}
a:hover {text-decoration: none; color: <?php echo "$myrow3[link_visited]" ?>}
input { font-family: <?php echo "$myrow3[form_text]" ?>; font-size: <?php echo "$myrow3[form_text_size]" ?>; color: <?php echo "$myrow3[form_text_color]" ?>;
font-style: font-weight: bold;
border: 2px solid <?php echo "$myrow3[form_border_color]" ?>; background-color: <?php echo "$myrow3[form_bg_color]" ?>;}
textarea { font-family: <?php echo "$myrow3[form_text]" ?>; font-size: <?php echo "$myrow3[form_text_size]" ?>; color: <?php echo "$myrow3[form_text_color]" ?>;
font-style: font-weight: bold;
border: 2px solid <?php echo "$myrow3[form_border_color]" ?>; background-color: <?php echo "$myrow3[form_bg_color]" ?>;}
select { font-family: <?php echo "$myro3w[form_text]" ?>; font-size: <?php echo "$myrow3[form_text_size]" ?>; color: <?php echo "$myrow3[form_text_color]" ?>;
font-style: font-weight: bold;
border: 2px solid <?php echo "$myrow3[form_border_color]" ?>; background-color: <?php echo "$myrow3[form_bg_color]" ?>;}
</style>
<style>
body {
scrollbar-3dlight-color: <?php echo "$myrow3[scrollbar_3dlight_color]" ?>;
scrollbar-arrow-color: <?php echo "$myrow3[scrollbar_arrow_color]" ?>;
scrollbar-base-color: <?php echo "$myrow3[scrollbar_base_color]" ?>;
scrollbar-darkshadow-color: <?php echo "$myrow3[scrollbar_darkshadow_color]" ?>;
scrollbar-face-color: <?php echo "$myrow3[scrollbar_face_color]" ?>;
scrollbar-highlight-color: <?php echo "$myrow3[scrollbar_highlight_color]" ?>;
scrollbar-shadow-color: <?php echo "$myrow3[scrollbar_shadow_color]" ?>;
/* scrollbar-track-color: <?php echo "$myrow3[scrollbar_track_color]" ?>;*/
}
</style>
</head>
<body bgcolor="#000000">
<?php
echo("$myrow4[header]");
?>
The echo("$myrow4[header]"); line is obviously where the header information is kept, however, when it posts it, the links look something like this:
http://www.fuziontek.com/ftek6/<?php
This is why:
When I post the links inside the header, I grab THAT from another table...now, I know that I'm not supposed to be making an opening php statement inside a php statement, so this is what I did...
I change the link to something like this:
<a href=\"echo("$myrow4[site_info]")/blah.php\">
Then that comes up like this:
[url]http://www.fuziontek.com/ftek6/echo[/url](
I tried it without the echo, without quotations, just about any way I could think of...what on EARTH am I doing wrong?