Get the value of the form request:
Case:
request.php
Copy code The code is as follows:
Calculate request
[code]
result.php
[code]
$grade=$_REQUEST['grade' ];//grade-->Same as the name value in the form
$arr=explode(" ",$grade);//Split the string with spaces and get the array result
print_r($ arr);
$res=0;
for($i=0;$i$res+=$arr[$i];
}
echo "
ALL=".$res;
echo "
AVG=".(round($res/count($arr),0)); //round(12.334,2)//Rounding method
?>
http://www.bkjia.com/PHPjc/770582.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/770582.htmlTechArticleGet the value of the form request: Case: request.php Copy the code as follows: html head meta http-equiv=" content-type" content="text/html;charset=utf-8;" /title calculation request/title /h...