um, maybe because you haven't defined total?

PHP Code:
$total 0//added this.


for($a=1;$a<5;$a++){

if(isset(
$_POST['cb'.$a]))
{
$amount $_POST['cb'.$a];
$total += $amount//<------ error referes to this line of code
}
}
echo 
$total