Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $data = $_POST;
- $response = array("status" => "ok");
- $error = array();
- foreach ($data as $key=>$value){
- $value = trim($value);
- if(empty($value)){
- $response['status'] = "error";
- $error[$key] = "Заполните поле";
- }
- }
- $response['error'] = $error;
- print json_encode($response);
Add Comment
Please, Sign In to add comment