Hi everyone I have a PHP file and this code:
<?php echo "Hello World"; ?>
<script type="text/javascript">
$(document).on('click', '.order-submit', function() {
dataName = $(this).data('name');
var company = <?php echo json_encode(get_Comp( /* dataName here */)); ?>;
});
</script>
How I can pass javascript variable "dataName" to my php function "get_Comp"? I will be very glad if someone help. Thanks!