PHP Classes

PHP Help! Urgent

Recommend this page to a friend!

      Facebook Integration for Zend Framework  >  All threads  >  PHP Help! Urgent  >  (Un) Subscribe thread alerts  
Subject:PHP Help! Urgent
Summary:php error
Messages:1
Author:Adeola
Date:2011-08-19 10:20:28
 

  1. PHP Help! Urgent   Reply   Report abuse  
Picture of Adeola Adeola - 2011-08-19 10:20:28
There is something wrong with the code below, but i can't just figure it out, please help me with the error.

<?php foreach($rexzs as $rexz){
$i++;
$rexzs=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($rexzs[1]==1)echo "Daily";else echo "One Time";
echo "<input type='hidden' value='".$rexzs[1]."' name='chargetype".$i."' /></td><td align='center'>";
echo "<select name='quantity".$i."'>";
for($j=0;$j<=$rexzs[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($rexzs[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'> $ ".$rexzs[2];
echo "</td><td align='center'> $ ";
if(!empty($_POST['quantity'.$i])) {
if($_POST['days'.$i]=='') echo ($_POST['quantity'.$i]*$rexzs[2]);
else echo ($_POST['days'.$i]*$_POST['quantity'.$i]*$rexzs[2]);
$total_ext+=$_POST['days'.$i]*$_POST['quantity'.$i]*$rexzs[2];
} else echo "0";
echo "<input type='hidden' name='cost".$i."' value='".$rexzs[2]."' />";
echo "</td></tr>"
}
?>

Thank you in anticipation.