Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Go to http://your_domaine/index.php?page=debug_page
- * GET Live Data From DataBase for Debeug(VAM)
- * Copy this file to your vam directory
- */
- header("Content-type: application/json");
- //include('/db_login.php');
- $db = new mysqli($db_host, $db_username, $db_password, $db_database);
- $db->set_charset("utf8");
- if ($db->connect_errno > 0) {
- die();
- }
- $query = 'SELECT ident, name, type FROM airports LIMIT 10';
- $json_data=array();
- $result = $db->query($query);
- while ($rec = $result->fetch_assoc())
- {
- $json_data['Airport_Debeug'][] = $rec;
- }
- echo json_encode($json_data);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement