-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
45 lines (37 loc) · 1.02 KB
/
index.php
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
<!DOCTYPE html>
<html>
<?php
include 'getGroup.php'
?>
<head>
<title>PHP Mothafucka</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
var data = {
"action": "test"
};
data = $(this).serialize() + "&" + $.param(data);
$.ajax({
type: "GET",
dataType: "json",
url: "getGroup.php",
}).done( function( data ){
console.log(data);
for(i = 0; i < data.length; i++){
$('.returned').append(data[i].name + " - " + data[i].count + "<br />");
}
});
return false;
});
</script>
</head>
<body>
<h1>PHP Retrieval</h1>
<div class="returned"></div>
<script>
//var obj = echo json_encode($count); ?>;
//console.log(obj);
</script>
</body>
</html>