$mysqli = @new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if ($mysqli->connect_errno)
exit('Ошибка соединения с БД');
$mysqli->set_charset('utf8');
$mysqli->query
("INSERT INTO `User`(`userid`, `first name`, `last name`, `url`)
VALUES ('$user->id','$user->first_name','$user->last_name','$user->photo_max')");
$mysqli->close();