Больше огрызков в корзину огрызков!
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?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);
|
||||
?>
|
||||
Reference in New Issue
Block a user