Below is the code I have.
The flow needs to be:
-On button click, value is passed to JS
-JS sets as variable
-The variable needs to be sent to PHP without refreshing the page (AJAX?)
-The variable needs to be output in php
Can anyone show me how to do this?
<a href="#modal-accept" data-toggle="modal"><button onclick="updateVar(2)" class="btn btn-acceptColor m-t-lg">Accept</button></a>
<script type="text/javascript">
function updateVar(profferRequestID){
var profferRequestID;
//pass to ajax then pass to php??
}
</script>
<?php
//echo out that JS variable
echo $profferRequestID;
?>