Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. $response = array();
  3. require_once __DIR__ . '/db_connect.php';
  4. $db = new DB_CONNECT();
  5. $result = mysql_query("SELECT *FROM weltvonhalva") or die(mysql_error());
  6. $response["weltvonhalva"] = array();
  7. while ($row = mysql_fetch_array($result)) {
  8. // temp user array
  9. $weltvonhalva = array();
  10. $weltvonhalva["id"] = $row["id"];
  11. $weltvonhalva["nachricht"] = $row["nachricht"];
  12. array_push($response["weltvonhalva"], $weltvonhalva);
  13. }
  14. $response["success"] = 1;
  15. echo json_encode($response);
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement