Image upload without refresh page in php and jquery

This is a simple php and jquery based image upload script to upload image without page refresh
Lets see how this works

  1. Create a html page with some jquery script

index.html

 

Image upload without refresh page


 



Upload your image



  1. Create upload.php file and copy and paste below in upload.php file.

upload.php

 ";
}
else
echo "failed";
}
else
echo "Image file size max 1 MB";
}
else
echo "Invalid file format..";
}
else
echo "Please select image..!";
exit;
}
?>




If you like this post please don’t forget to subscribe My Public Notebook for more useful stuff.

Posted in PHP