Hi,
I've been looking around for hours for the solution to this problem but so far have come up with nothing, and it is seemingly simple. If anyone could help me on this they would be a livesaver...
I have a page listing product orders by getting session variables:
<?
foreach($POST as $key => $val)
{
if(!empty($val))
{
$SESSION[$key] = $val;
}
}
?>
Then it lists ordered products:
<?
if(!empty($SESSION))
{
foreach($SESSION as $key => $val)
{
$pspackdetails = $val);
if($val != "Submit") { if($val != "Add To Cart") { if($val != "keane") { if($val != "ian") {
if(!empty($val))
{
if(preg_match('|_q$|',$key))
{ echo '<span class="quantity"><input name="'.$key.'" value="'.$pspackdetails.'" type="text" size="3"></span><br>'; }
elseif(preg_match('||',$key)) echo '<span class="item">'.$pspackdetails.'</span>';
}
}
?>
I need to be able to remove products but entering 0 in the quantity box returns the page with the same old value. Is it something to do with the if(!empty($val)) line?
Please help!!!