$(".save_form_email").on('click', function() {
var pocet = $('#save__cena').val();
console.table(pocet);
$.ajax({
url: '/modules/mod_custom_extended/tmpl/default.php',
type: 'POST',
data: {
pocet: pocet
},
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
success: function(response) {
console.table(response);
},
error: function(jqXHR, textStatus, errorThrown) {
console.log('AJAX request failed: ' + textStatus + ', ' + errorThrown);
}
});
});
This is the PHP
<?php
if (isset($_POST['pocet'])) {
$temp_pocet = $_POST['pocet'];
}
?>
This is my attempt to send value of html input field with id "save__cena" to the php so i can later use this price to send it to stripe. Currently i have nothing in php variable temp_pocet