-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresult.php
More file actions
47 lines (35 loc) · 814 Bytes
/
result.php
File metadata and controls
47 lines (35 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<script type="text/javascript">
function average(inputData){
var arr = JSON.parse(inputData);
var len = arr.length;
var sum = 0;
for( i=0; i<len; i++){
sum += arr[i];
}
var average = sum/len;
document.getElementById("result").innerHTML = average;
}
function median(inputData){
}
function min(inputData){
}
function max(inputData){
}
</script>
<?php
$peerID = $_POST['peerID'];
$name = $_POST['name'];
$orgID = $_POST['orgID'];
$inputData = $_POST['inputData'];
$procedure = $_POST['procedure'];
$result = $_POST['result'];
echo "<html><body onload=\"$procedure('$inputData')\">";
echo "peerID: $peerID <br>";
echo "name: $name <br>";
echo "orgID: $orgID <br>";
echo "inputData: $inputData <br>";
echo "procedure: $procedure <br>";
echo "<br>";
echo "result: $result";
echo "</body></html>";
?>