 <!DOCTYPE html>  
 <!-- index.php !-->  
 <html>  
      <head>  
           <title>Names for prayer</title> 
			<link rel = "icon" href ="Church_logo.png" type = "image/x-icon">		   
           <link rel="stylesheet" href="view_form.css" />  
           <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>  
      </head>
      <body>  
           <br /><br />  

                <h3 align="center">Names for prayer</h3> 
                <div ng-app="myapp" ng-controller="usercontroller" ng-init="displayData()">   
                     <table>  
					 <thead>
                          <tr>  
                               <th>Date</th>  
                               <th>Dontype</th> 
							   <th>For prayer</th>  
                               <th>Donation type</th>  
                          </tr>
					</thead>						  
                          <tr ng-repeat="x in names">  
                               <td>{{x.Dat}}</td>  
                               <td>{{x.Dontype}}</td>  
							    <td>{{x.Username}}</td>  
                               <td>{{x.payment}}</td>  
                          </tr>  
                     </table>  
                </div>  
 
      </body> 
 </html>  
 <script>  
 var app = angular.module("myapp",[]);  
 app.controller("usercontroller", function($scope, $http){  

      $scope.displayData = function(){  
           $http.get("select.php")  
           .success(function(data){  
                $scope.names = data;  
           });  
      }  
 });  
 </script> 