Is there any other way that html code wants to call php, other than submit form submission?

is there any other way that the html code wants to call php, other than submit form submission?

<?php

function request(){

}

?>
<html id="html">
<button id="btn_click" onclick="request1()">click</button>


</html>
<script  type="text/javascript">
    function request1(){
        document.write("<h1></h1>");
        console.log("asdas");
    }
</script>

Dec.29,2021

cannot be called on your page. Js is a browser scripting language and php is a server language. You can't see your PHP code at all when you open the page. You can try ajax event data interaction.

Menu