How to display image from database using php

前端 未结 11 2690
闹比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:09

    If you want to show images from database then first you have to insert the images in database then you can show that image on page. Follow the below code to show or display or fetch the image.

    Here I am showing image and name from database.

    Note: I am only storing the path of image in database but actual image i am storing in photo folder.

    PHP Complete Code with design: show-code.php

       
    
    
    
    
    
    Show Image in PHP - Campuslife
    
    
        
        
        

    Showing Images from database

    If you found any mistake then you can directly follow the tutorial which is i found from where. You can see the live tutorial step by step on this website.

    I hope may be you like my answer.

    Thank You

    https://www.campuslife.co.in/Php/how-to-show-image-from-database-using-php-mysql.php

    Output

    [Showing Images from Database][1]

    https://www.campuslife.co.in/Php/image/show-image1.png

提交回复
热议问题