Hello there, i getting this error and trying to solve with myself about 5hrs and still cant get what i want.
i want to upload an image to my server (000webhost) and inserting the data image to database.
i have checking all my php and blocks, and i think there is no error, but the data not inserted into mysql
this is my upload php, my koneksi.php is work because i test with login
I’m sorry, I don’t think I understand. Can you or can’t you upload your image to the host?
Do you know the difference between uploading a file and inserting it into the database?
So you already know that the problem is in Mysql? So it must be a Mysql bug, right? I think there is a support on the Mysql website that addresses these bugs.
i can upload my image to the host, i have add the screenshot above.
yes, because in my local with same code same database its working, but on online server its not work.
thats why need help someone check my code maybe? or something else
my koneksi is fine, i and try to test using print r to debug. and echo success message
when on my local server its working good, the img uploaded with database inserted.
but when i try on 000webhost , now my database not inserted but my img uploaded
the debug upload prosess
thanks, i can resolve it because the ticks inside insert my original insert query like this step1:
mysqli_query($koneksi,“insert into foto Values(‘’,‘$imgName’)”; this the first i get error when on hosting i change to step2
mysqli_query($koneksi,“insert into foto (‘imgName’)Values(‘$imgName’)”; this the second i get error, because diff php version syntax i change to step3
mysqli_query($koneksi,“insert into foto (imgName )Values(‘$imgName’)”; the best, uploaded img on host folder, and inserted data on table ’ → `