My include doesn't have code that should go in the head though. I already have the recordset coded in there and the reason I've chosen includes is because my recordset is different on every page, however the section pertaining to displaying the product information isn't.
If I use Framework build plugins then won't I need to create one for every one of my differing recordsets?
If I have coded the recordset manually in the head of the page above the DOCTYPE:
<?php require_once('Connections/njMySQL.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_njMySQL, $njMySQL);
$query_rsPRODFULL = "SELECT LEDid, LEDtitle, LEDproductcode, LEDtypeID, LEDwattage, LEDdimmable, LEDbeamangle, LEDprice, LEDimgtmb, LEDdelete FROM LEDprods WHERE LEDdimmable = 1";
$rsPRODFULL = mysql_query($query_rsPRODFULL, $njMySQL) or die(mysql_error());
$row_rsPRODFULL = mysql_fetch_assoc($rsPRODFULL);
$totalRows_rsPRODFULL = mysql_num_rows($rsPRODFULL);
?>
...and then further down my page I have an include file that is simply calling fields from the above recordset, along with CSS styling and layout obviously, then shouldn't it work?
NJ