Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "(My real info here)";
- $user = "(My real info here)";
- $password = "(My real info here)";
- $db = "(My real info here)";
- $sql = "select * from user;";
- $con = mysqli_connect($host, $user, $password, $db);
- $result = mysqli_query($con,&sql);
- $response = array();
- while(&row = mysqli_fetch_array($result))
- {
- array_push($response,array("name"=>$row[1]),"class">$row[3]));
- }
- echo json_encode(array("server_response"=>$response));
- mysqli_close($con);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement