如何将实现会话放入echo以将变量回显到另一个页面

时间:2018-02-07 19:38:03

标签: javascript php html mysql phpmyadmin

我在将my myimage实现到我的echos会话时遇到问题。我的目标是将$ myimage放入echo但是idk怎么做,所以我希望有人遇到我的帖子。我有一个画廊照片和当我点击某些东西它没有发送我点击的照片,而不是我添加的最后一张照片。

    <?php

    while ($row = mysqli_fetch_assoc($result)) { 

    $myimage="".$row['image']."";

    $_SESSION['myimage'] = $myimage;

    echo "<div class='img-single'>
    <a href='images/fpage.php'><img class='i' src='images/".$row['image']."'>
    </a><figcaption class='figcaption'>".$row['image_text']."</figcaption> 
    </div>";  
    }
    ?>



    trying to make something look like this

    <?php

    while ($row = mysqli_fetch_assoc($result)) { 

   //$myimage="".$row['image']."";

    $_SESSION['myimage'] = $myimage;

    echo "<div class='img-single'>
    <a href='images/fpage.php'><img class='i' 
    src='images/$myimage="".$row['image']."";'>
    </a><figcaption class='figcaption'>".$row['image_text']."</figcaption> 
    </div>";  
    }
    ?>

0 个答案:

没有答案