The problem with the embedding line. It is necessary that in url() , there is the following: '/path/to/file/img.jpg' . The string (without single quotes) is stored in $_SESSION['img'] . Desired result: url('/path/to/file/img.jpg');

 echo '<body> <div id="img" style="background: url();"></p> </body>'; 

    2 answers 2

    Hello!

    If I understand correctly, then you need this:

     <?php echo '<body> <div id="img" style="background: url('.$_SESSION['img'].');"></p> </body>'; ?> 
    • Hello. So, as far as I know, the image will not be displayed. See my answer. Thanks all the same. - Marionette
     <?php echo '<body> <div id="img" style="background: url(\''.$_SESSION['img'].'\');"></p> </body>'; ?>