Skip to content

Latest commit

 

History

History
22 lines (12 loc) · 744 Bytes

File metadata and controls

22 lines (12 loc) · 744 Bytes

Ajax Image Upload using PHP and jQuery

In this process the image is selected first and previewed before storing it in to any location . Then using jQuery Ajax, it is send to php script on submit button event.

PHP script stores the image in a defined location and returns the message of the success and failure of the process.

Here we have applied some validations on the selected file, to check it whether it is an image file (jpg, jpeg or png ) or any other file type.

Upload File size allowed is 100 Kb.


Following steps are pointed under this process :

  1. Include jQuery library.

  2. HTML page with upload field.

  3. jQuery Ajax code.

  4. PHP script to store image.

Next step - update the values in the database using MySQL