$bg=mysqli_fetch_array($db->query("SELECT * FROM `background` WHERE `id`='1'"));
$photo= 'data:image/' . 'gif'. ';base64,' . base64_encode($bg['background']);
?>
<style>
body{
background-image: url("<?php echo $photo; ?>");
}
</style>
ответ дан пользователем
WapSter