battles/_unused-files/clan_log.php

18 lines
481 B
PHP
Raw Normal View History

2018-01-28 16:40:49 +00:00
<?php
$errors = array();
$form_data = array();
if(empty($_POST['user'])) $errors['name'] = 'Вы кто?';
if(empty($_POST['hash'])) $errors['name'] = 'Где потеряли Hash?';
if(empty($_POST['sorted'])) $errors['name'] = 'Не понимаю кого искать ...';
if(!empty($errors)) {
$form_data['success'] = false;
$form_data['errors'] = $errors;
} else {
$form_data['success'] = true;
$form_data['posted'] = 'Great';
}
echo json_encode($form_data);
?>