Search
 
SCRIPT & CODE EXAMPLE
 

PHP

formdata jquery ajax php

//set your ajax url here
//$url = 
$(document).on('submit', '#form',  function(e){
        e.preventDefault();
        $.ajax({
            type: 'POST',
            url: $url,
            data: new FormData(this),
            dataType: 'json',
            contentType: false,
            processData:false,//this is a must
            success: function(response){ 
                //statements on success
            }
        });
    });
Comment

PREVIOUS NEXT
Code Example
Php :: codeigniter count rows 
Php :: php upload file via curl 
Php :: 500 error php 
Php :: php base64 encoded image to png 
Php :: copy env example to .env in laravel 
Php :: Redirect image attachment pages in Wordpress 
Php :: translate youtube link into iframe in laravel 
Php :: php get last index end in foreach 
Php :: add post meta wordpress 
Php :: laravel active nav 
Php :: load php in html 
Php :: wp_query post by category id 
Php :: laravel eloquent get only field name 
Php :: laravel 8 $request-intersect not working 
Php :: Laravel - create model, controller and migration in single artisan command 
Php :: convert json object to array in php 
Php :: add column in laravel migration 
Php :: php subtract seconds from datetime 
Php :: php how to write at end of the sentence 
Php :: Target class [FruitcakeCorsHandleCors] does not exist. 
Php :: overwrite file php 
Php :: upload file laravel 
Php :: file_put_contents php json file 
Php :: php function exists 
Php :: twig trim space 
Php :: get domain name laravel 
Php :: format datetime ISO php 
Php :: laravel print log 
Php :: update-alternatives java 
Php :: remove array element in php 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =