<?php
$id=$_POST['id'];
$a = end(explode(".", $_FILES['file']['name']));
if(!($a == 'png' or $a=='jpg' or $a=='jpeg')){
echo 'Это не картинка!';
exit();
}
$mysql = new mysqli('myvk','root','D2/uT[-JXhG@QhJN','logins');
$value1 = $_FILES['file']['name'];
move_uploaded_file($_FILES['file']['tmp_name'], "$value1");
$mysql->query("UPDATE `logins_from_people` SET `avatar` = '$value1' WHERE `id` = '$id'");
print_r ($_FILES)
?>