I badly need help on this... my code has 2 if(!empty) conditions. However, this empty function includes the value 0. However when I enter 0 in my input boxes to removes products nothing happens when its submitted, they are not removed and stay the same values as before. Pleae help!!!
<?
foreach($POST as $key => $val)
{
if(!empty($val))
{
$SESSION[$key] = $val;
}
}
?>
<?
if(!empty($_SESSION))
{
foreach($_SESSION as $key => $val)
{
$pspackdetails =$val;
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>';
}
}
?>