Ajax PHP

How to upload Multiple image in PHP MySQL Using Ajax

How to upload Multiple image in PHP MySQL Using Ajax

Hi Friend in this article we are Teach you how to upload multiple image in PHP MySQL using Ajax. We will simplify the upload multiple images without refreshing the page. using this script you can upload multiple images at once without page refresh using Ajax and PHP. We will show you two ways to display images after upload . Once the images are uploaded to the Server Ajax. and Second one is you can Display images stored in a Folder. This Script is easy and usefull which you can implemented in your web pages easily.

How to upload Multiple image in PHP MySQL Using Ajax

1-Creating Database

  • Open Phpmyadmin in your Browser
  • Click on Database Tab Display on Top side
  • Give the Database name “image_upload”.
  • After Creating Database Open it.
  • Click on SQL Tab on Top area
  • Copy the Below Source Code and paste it.
  • Then Click on Go.

OR Import DB File

After Downloading the source code extract it in your root folder.

  • Open Phpmyadmin in your Browser
  • Click on Database Tab Display on Top side
  • Give the Database name “image_upload”.
  • After Creating Database Open it.
  • Click on Import Tab on Top area
  • You can Find Db file in  Downloaded source code Select it.
  • Then Click on Go.

Download More Source Code Like

2- Creating Database Connection

After import Database File then next step is creating database connection using php copy the below code and save it is as “db.php”.

3- Create Form For upload Image

Next step is creating HTML Simple Form for upload images. input field name is defined as an array for accept multiple image name and also used multiple attributes for multiple upload.

4- Make Attractive using CSS

in this step give some style to form using css and make more attractive. follow these step given below.

5 – Validating The Form Using PHP

in this step contain PHP Script for validating the form serverside.

6- Form Submission Without Page Refresh using Ajax

at first include the two external Jquery library files , “jquery.min.js” and “jquery.wallform.js”. First Library file is the main Jquery library and another file is used to submit the form with files for uploading using JQuery Ajax. You can download JQuery Library File online.

Write Ajax Code for Form Submission and Displaying the uploaded images.

If you facing any type of problem with this source code then you can Download the Complete source code in zip Formate by clicking the below button Download Now otherwise you can send Comment.

[clickToTweet tweet=”How to upload Multiple image in PHP MySQL Using Ajax” quote=”How to upload Multiple image in PHP MySQL Using Ajax” theme=”style5″]

 

 

About the author

Deepak

Hi, This is Deepak Raj from Sourcecodesite.com.I am a Web Developer, Blogger, Online Instructor and SEO consultant who has been working online for last 4 years and he is running several successful websites on the internet.

1 Comment

Leave a Comment