KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way I can run a php function through a JS function? something like this: <script type="text/javascript"> function test(){ document.getElementById("php_code").innerHTML="<?php query("hello"); ?>"; } </script> <a href="#" style="display:block; color:#000033; font-family:Tahoma; font-size:12px;" onclick="test(); return false;"> test </a> <span id="php_code"> </span> I basically want to run the php function query("hello") , when I click on the href called "Test" which would call the php function.
Tags (comma-separated)
Save Edits
Cancel