I want to send a javascript variable which contains an image base64 (png) value (Too big for GET requests). How do i send this base64 value to the php page (POST request) so as to decode base64 and then save it.
var base64 = this.tobase64(); // store base64 value to this variable
$.post('/js/uploadify/handler.php', {basevalue: base64});
});
window.location = "http://localhost/file/handler.php";
I tried the above code but it does not work,
I want to send the value with an onclick event on a button (which is not a submit button). I am not using forms.
PHP CODE
$val = $_POST['basevalue'];
echo $val;
I get Notice: Undefined index: basevalue error
thanks!.