the problem is code otrder.
The eCart code block is before the code for the recordset.
on the details page, move this code:
<?php require_once('../Connections/ks.php'); ?>
<?php require_once("../webassist/database_management/wa_appbuilder_php.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;
}
}
?>
<?php
$ParamProductID_WADAks_products = "-1";
if (isset($_GET['ProductID'])) {
$ParamProductID_WADAks_products = $_GET['ProductID'];
}
mysql_select_db($database_ks, $ks);
$query_WADAks_products = sprintf("SELECT ProductID, ProductName, ProductImage, ProductName, ProductShortDesc, ProductLongDesc, ProductPrice, ProductShortDesc, ProductLongDesc FROM ks_products WHERE ProductID = %s", GetSQLValueString($ParamProductID_WADAks_products, "int"));
$WADAks_products = mysql_query($query_WADAks_products, $ks) or die(mysql_error());
$row_WADAks_products = mysql_fetch_assoc($WADAks_products);
$totalRows_WADAks_products = mysql_num_rows($WADAks_products);
?>
to line 1