$c[0]=300;
$c[1]=300;
$c[2]=300;
$c[3]=300;
$c[4]=0;
if($fes=='3')
foreach($price as $key=>$value){
foreach($name as $key=>$value2)
foreach($c as $key=>$value3)
$d[] = $c[$key]+$price[$key];
foreach($d as $key=>$value4)
$upd_price2 = mysql_query("UPDATE rate SET price='$d[$key]' WHERE name='$name[$key]'");
}