0

my code:

<script>
    comform.onclick=function(){
        if(window.confirm("confirm?")){
           <?php
              //I want to write it here
           ?>
       }
     }
</script>

how can I do for it? or the js and php can't been together?

賀皓群
  • 1
  • 1
  • See: [PHP and JavaScript - What is the difference?](https://stackoverflow.com/questions/5054171/php-and-javascript-what-is-the-difference) – KIKO Software Nov 06 '22 at 09:37
  • Also, this might help: https://stackoverflow.com/questions/15757750/how-can-i-call-php-functions-by-javascript – JoshG Nov 06 '22 at 09:38

0 Answers0