Hi there,
I am getting a error in the final line of the first ‘included’ file below and I think it is because I am not closing a statement using the } symbol until in another file (later included).
I am using this coding and the content looks fine in Dreamweaver but not when it is online:
<?php include("coding.php"); ?>
<?php include("top-navigation.php"); ?>
<?php include("left-navigation.php"); ?>
<?php include("product-content.php"); ?>
<?php include("foot-navigation.php"); ?>
I have an idea what the problem is. If you look at the coding for coding.php below you will see that I am not closing with the } in the coding.php file. Instead I am closing in a different php file. This is why I get an error. Like I say it works fine in Dreamweaver but not online. Is it because I am not closing with the } symbols? Does Internet Explorer not like closing in other files?!?
<?php include("db.php");
$result = mysql_query("select * from cart inner join products on cart.productid = products.productid where cart.cookieid = '" . GetCartId() . "' order by products.name asc");
$res = mysql_query("SELECT * FROM categories");
while($row = mysql_fetch_array($res)) {
$cats[$row['categoryid']] = $row['categoryname'];
}
//Load categories and products for category clicked.
if(isset($_GET['category'])) {
$selcat = $_GET['category'];
}
//Load categories and products within category of product clicked.
if(isset($_GET['product'])) {
echo "yes";
$prod_info = mysql_fetch_array(mysql_query("SELECT * FROM products WHERE productid = '".$_GET['product']."'"));
//Prod_Info now gets stored for use in the main display.
$selcat = $prod_info['categoryid'];
echo $selcat;
}
$data = mysql_query("SELECT * FROM products WHERE productid = '".$_GET['product']."'");
while($row = mysql_fetch_array($data)){
?>
Hope you can help,
Matt.