Advertisement
gidmakus

gidmakus / What am i doing wrong

Dec 18th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php session_start();
  2. include('includes/config.php');
  3.  
  4. //$query="select * from motor_ins_check where insurance_company ='$_SESSION[org]';
  5. $result = $mysqli->query(CALL clientele('$_SESSION[org])') or die($mysqli->error.__LINE__);
  6.  
  7. $arr = array();
  8. if($result->num_rows > 0) {
  9.     while($row = $result->fetch_assoc()) {
  10.         $arr[] = $row; 
  11.     }
  12. }
  13. # JSON-encode the response
  14. $json_response = json_encode($arr);
  15.  
  16. // # Return the response
  17. echo $json_response;
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement