Welcome Guest, Not a member yet? Register   Sign In
uploading an image (BLOB) to mysql
#4

Because you are inserting it  wrong.

Look at this code.

PHP Code:
$products[] = [
    
'product_name' => 'MySQL DATABASES',
    'price' => 15,
    'product_image' => file_get_contents("https://i.imgur.com/UYcHkKD.png" )
]; 

You assign the contents to the image not png.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
uploading an image (BLOB) to mysql - by richb201 - 03-19-2021, 09:04 AM
RE: uploading an image (BLOB) to mysql - by InsiteFX - 03-20-2021, 11:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB