samedi 9 mai 2015

PHP Website syntax error [duplicate]

This question already has an answer here:

The website gives me this error code when I try and click on any product on the page:

Parse error: syntax error, unexpected T_IF in /home/content/20/10101520/html/product_details.php on line 8

$sub_product_id = $_REQUEST['spi'];
include 'connect.php'
/* validation for the sub product started */
if ($sub_product_id > 0)
{
$check_spi_query = "select count(id) from sub_products where id =            '$sub_product_id' and product_id = '$id' and status != 'hidden'";
$check_spi_result = hb_get_result($check_spi_query) or die(mysql_error());
$check_spi_total = mysql_result($check_spi_result, 0);
if ($check_spi_total <= 0) 
{
    //location("index.php");
}
}

any help is very much appriceated thanks so much.




Aucun commentaire:

Enregistrer un commentaire