How to display image from database using php

前端 未结 11 2714
闹比i
闹比i 2020-11-27 21:43

I am trying to display an image coming from the database and I was not able to display the image .but its showing like this user-1.jpg Please see my code can on

11条回答
  •  甜味超标
    2020-11-27 22:29

    You need to do this to display image

    $sqlimage  = "SELECT image FROM userdetail where `id` = $id1";
    $imageresult1 = mysql_query($sqlimage);
    
    while($rows=mysql_fetch_assoc($imageresult1))
    {
        $image = $rows['image'];
        echo "";
        echo "
    "; }

    You need to use html img tag.

提交回复
热议问题