Something where i’m struggling with some time is to ask for a value with a JS prompt and use this result to run a query.
So I want the user to enter a value before closing a form or when losing a focus. I suppose i have to use a JS prompt and store this value in a var.
But how can I use this value to run a query and update a database table? Can someone help me with some example code?
It’s easy to use a PHP value in a JS environment using this format mixed with JS code: <?php echo $val; <?
The opposite way is not working!
<script>
var tmp ‘test’
<?php $val= <? tmp;
</script>
Somenone?