$con = mysqli_connect('localhost','admin','admin','test') or die("ERROR");
$con->set_charset("utf8");
$query = mysqli_query($con, " INSERT INTO users (avatar) VALUES ('$avatar') WHERE id='$userid'");
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);