Answer the question
In order to leave comments, you need to log in
How to pass image data from base64 src attribute via AJAX and receive it in PHP?
How to pass image data from base64 src attribute via AJAX and receive it in PHP using imagecreatefromstring? If I just pass it as a regular variable, php gives out invalid data in imagecreatefromstring
var data64 = canvasImg.toDataURL("image/jpeg");
$.post("/ajax", { base64: data64},
function(data){
alert(data);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question