Please can some help me with the error in the code below.
thank you in anticipation.
<?php $obj = new Unit();
{
global $database;
$Unit = $obj->select_row_query
("SELECT `reservation_extras` FROM `".$obj->get_table_name()."`
WHERE `id` = '".$_GET['PropertyId']."' AND `published` = 1", 1);
$rexzz=explode(",", $Unit->reservation_extras);
$i=0;
$total_ext=0;
if(!empty($Unit->reservation_extras)||$Unit->reservation_extras=='[end]');
}
foreach($rexzz as $rexz)
{
$i++;$rexzz=explode("|",$rexz);
$database->setQuery("SELECT * FROM `jos_bookman_extras` WHERE `id`=".$rexzz[0]);
$exts=$database->loadObjectList();
echo "<tr><td align='center'>";
foreach($exts as $ext)
{
echo $ext->name;
}
echo "<input type='hidden' value='".$ext->name."' name='ext_name".$i."' /></td>
<td align='center'>"; if($rexzz[1]==1)echo "Daily";else echo "One Time";
echo "<input type='hidden' value='".$rexzz[1]."' name='chargetype".$i."' /></td>
<td align='center'>"; echo "<select name='quantity".$i."'>";
for($j=0;$j<=$rexzz[3];$j++)
{echo "<option ";
if($_POST['quantity'.$i]==$j)echo "selected";
echo " value='".$j."'>0".$j."</option>";
}
echo "</select>";
echo "</td>
<td align='center'>";
if($rexzz[1]==1)
{
echo "<select name='days".$i."'>";
for($j=0;$j<=$days;$j++)
{
echo "<option ";
if($_POST['days'.$i]==$j)echo "selected";
echo " value='".$j."'>0".$j."</option>";
}
echo "</select>";
}
else echo "<input type='hidden' value='' name='days".$i."' />";
echo "</td><td align='center'> $ ".$rexzz[2];
echo "</td><td align='center'> $ ";
if(!empty($_POST['quantity'.$i]))
{
if($_POST['days'.$i]=='') echo ($_POST['quantity'.$i]*$rexzz[2]);
else echo ($_POST['days'.$i]*$_POST['quantity'.$i]*$rexzz[2]);
$total_ext+=$_POST['days'.$i]*$_POST['quantity'.$i]*$rexzz[2];
}
else echo "0";
echo "<input type='hidden' name='cost".$i."' value='".$rexzz[2]."' />";
echo "</td></tr>"
}
?>