Forum Moderators: coopster
I'm running a popular PHP forum on my server and wish to add a little holiday cheer to it, via javascript encoded bats that fly around your mouse pointer. Silly, yes I know, but I figured it would help me become a better programmer if I could only figure out how to execute the JS from my index.php.
Can I simply cut and paste the javascript into the php somewhere and hope for the best, or is this going to be a difficult task?
And, I'm using the PHPBB to run my forum. Any help would be greatly appreciated. (warning, I am sorta new at programming php).
[edited by: jatar_k at 3:13 am (utc) on Oct. 19, 2005]
[edit reason] no urls thanks [/edit]
There are many ways of creating the output:
<?php
$a = 2;
?>
<script type="text/javascript">
<!--
var a = <?php echo $a;?>;
//-->
</script>
<?php
$a = 2;
echo "<script type=\"text/javascript\">
<!--
var a = $a;
//-->
</script>";
Hope this helps you!
Best regards
Michal Cibor