hi. i am currently having problems in using javascript in my PHP document. I saved my webpage as a php file but when i coded the javascript in my php doc nothings happening. So my basic question is that is it allowed to used javascript if my document is in PHP extension name?
please. thank you.
can i use javascript inside A PHP document?
Moderator: General Moderators
You can have javascript in your page. consider the following:
is your page setup similar? it would help if you could post the code you are using.
Code: Select all
<html>
<script type="text/javascript">
// your javascript code goes here
</script>
<body>
<?php
//your php code goes here
?>
<p>this is some html</p>
</body>
</html>