Simple Ajax Upload image using jQuery PHP

Today, We want to share with you Simple Ajax Upload image using jQuery PHP.In this post we will show you how to insert image in database using ajax in php, hear for ajax image upload without refreshing page using jquery we will give you demo and example for implement.In this post, we will learn about Upload Image Without Page Refresh Using Ajax,jQuery And PHP with an example.

Simple Ajax Upload image using jQuery PHP

There are the Following The simple About Simple Ajax Upload image using jQuery PHP Full Information With Example and source code.

  Concept of Encapsulation in PHP OOP Example

As I will cover this Post with live Working example to develop jquery ajax image upload with preview, so the some upload image using ajax in php for this example is following below.

Upload image using ajax jquery


<title>Upload Image Using Ajax Example -</title>

<form method="post" action="upload.php" id="upload">

<div id="img_preview"></div>

			url: "do_upload.php",
			dataType: "json",
			type: "POST",             
			data: new FormData(this), 
			contentType: false,       
			cache: false,
			success: function(response){
			if(response.is_status == "1"){
				jQuery("#img_preview").html('<img src='+response.img+'>');
			}else if(response.is_status == "0"){

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

Download Project Scripts


When simple YOur Live image is uploaded to server side in PHP format it return output in sample json format.

  Eloquent Unions Query Laravel Database

 1, "img" => $name);
	$res = array("is_status" => 0, "msg" => "error");
header("content-type: application/json");
echo json_encode($res);

Angular 6 CRUD Operations Application Tutorials

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Simple Ajax Upload image using jQuery PHP.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related FAQ

Here are some more FAQ related to this Article:

  1.   PHP MySQL Inline Editing Dynamically using jQuery Ajax
  2.   PHP and Ajax Asynchronous File Upload using jQuery
  3.   Merger of vodafone and Idea News
  4.   jQuery Ajax Upload Multiple Images using PHP
  5.   how to use php in javascript? - Example | php code in javascript
  6.   PHP Array Length size count Function with Example
  7.   jQuery Ajax File Upload images using PHP MySQLi
  8.   Ajax Image Upload without Refreshing Page using Jquery
  9.   jQuery Ajax Image Upload without Page Refresh using PHP
  10.   How to get the sum of numbers in an array javascript?

Leave a Reply

Your email address will not be published. Required fields are marked *