{"id":16937,"date":"2020-08-07T06:57:10","date_gmt":"2020-08-07T06:57:10","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=16937"},"modified":"2021-10-30T05:43:12","modified_gmt":"2021-10-30T05:43:12","slug":"multiple-image-upload-with-edit-delete-using-php-mysql","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/multiple-image-upload-with-edit-delete-using-php-mysql\/","title":{"rendered":"Multiple Image Upload with Edit Delete using PHP Mysql"},"content":{"rendered":"\n<p>In this topic, we are going to see how to multiple image upload with edit delete using <strong>PHP Mysql<\/strong>.<\/p>\n\n\n\n<p>When Multiple Images uploaded into the folder then after we have to insert uploaded images details like image name and description in the table. So every uploaded image data will be inserted into the <strong>Mysql <\/strong>table. After uploading the image we have by using Ajax function fetch image details from the <strong>Mysql <\/strong>table and display on the web page in table format with edit and delete button.<\/p>\n\n\n\n<p>This all upload of multiple images and after that inserting of uploaded images data into <strong>MySQL <\/strong>table process has been done without refresh of the web page because we have to use Ajax for this things with <strong>PHP <\/strong>and <strong>Mysql<\/strong>.<\/p>\n\n\n\n<p>Here is the script:<\/p>\n\n\n\n<p><strong>index.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/f737c02c4d53750d0d438db52384ec11.js\"><\/script>\n\n\n\n<p><strong>database_connection.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/a9f1c2c0f2ff9998a013e2534612a44c.js\"><\/script>\n\n\n\n<p><strong>fetch.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/2bed1373cddd55454c75535dfeb74960.js\"><\/script>\n\n\n\n<p><strong>update.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/9b00bde86326c24a35b950e2d6592b60.js\"><\/script>\n\n\n\n<p><strong>upload.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/c732727a7d4a7d8d2bb8371a57743019.js\"><\/script>\n\n\n\n<p><strong>edit.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/ed62cef18e7ea6716ca2926e852fc3c7.js\"><\/script>\n\n\n\n<p><strong>delete.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/4d25da68a6ce248f515ead605ee92105.js\"><\/script>\n\n\n\n<p><strong>Database:<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/narayanlog\/bd306ea7986b115e638ca50d5e3f50ec.js\"><\/script>\n\n\n\n<p>Then, see the result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"207\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image-1024x207.png\" alt=\"\" class=\"wp-image-16948\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image-1024x207.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image-300x61.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image-768x155.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image.png 1163w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After upload the image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"369\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image2-1024x369.png\" alt=\"\" class=\"wp-image-16950\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image2-1024x369.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image2-300x108.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image2-768x276.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image2.png 1139w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>See, the image will also store in the database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"118\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image3.png\" alt=\"\" class=\"wp-image-16949\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image3.png 560w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/08\/multiple-image3-300x63.png 300w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/figure>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_41078\"><iframe loading=\"lazy\"  id=\"_ytid_42328\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_41078\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>In this topic, we are going to see how to multiple image upload with edit delete using PHP Mysql. When Multiple Images uploaded into the folder then after we have&#8230; <\/p>\n","protected":false},"author":9,"featured_media":16951,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5150],"tags":[177],"class_list":["post-16937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-php"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=16937"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16937\/revisions"}],"predecessor-version":[{"id":24635,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16937\/revisions\/24635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/16951"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=16937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=16937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=16937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}