Send Image with Ajax to database (php) without reloading [duplicate]
Clash Royale CLAN TAG #URR8PPP Send Image with Ajax to database (php) without reloading [duplicate] This question already has an answer here: I create a bootstrap modal popup form to add picture in gallery page, I developed the php & ajax code because i want without page reloading here :- the problem is when I want to send image to database I show this error Notice: Undefined index: photo in .... Notice: Undefined index: photo in .... I can't send image. this's my ajax code $(function() { //twitter bootstrap script $("button#submit").click(function(){ $.ajax({ type: "POST", url: "image.php", data: $('form.contact').serialize(), success: function(msg){ $("#thanks").html(msg) $("#myModal").modal('hide'); }, error: function(){ alert("failure"); } }); }); }); And this's Image.php file include 'db.php'; if(isset($_POST['titre']...