require_once 'mysql_connect.php';
$name = $_FILES['image']['name'];
$tmp_name = $_FILES['image']['tmp_name'];
move_uploaded_file($tmp_name, "user_photo/" . $name);
$sql = 'INSERT INTO users(user_image) VALUES(?)';
$query = $pdo->prepare($sql);
$query->execute([$name]);