Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $result = array(
- 'status' => FALSE,
- 'message' => NULL
- );
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- $result['post'] = $post = $_POST;
- if (isset($post['status']) && $post['status'] == 1) {
- $result['status'] = TRUE;
- } elseif (isset($post['status']) && $post['status'] == 0) {
- $result['message'] = 'silakan ganti dengan pilihan lain';
- } else {
- $result[''] = 'unk';
- }
- unset($result['post']);
- echo json_encode($result);
Advertisement
Add Comment
Please, Sign In to add comment