Hi,
I was wondering if anyone could give me a hand with this. Is there anything special I need to know about using JavaScript inside of PHP?
I am making a calendar that I want to display a red dot on dates that have an entry in the database. My code for the particular dates is like this:
<td>
<script>
<!--
redBall(80102);
-->
</script>
</td>
And then redBall is defined at the top of the page (which has an extension of .php) something like this:
<?php
function redBall($datePick) {
$stuff = mysql_query("SELECT * FROM $month where Date = $dayPick");
$someNum=mysql_numrows($stuff);
if ($someNum > 0) {
echo("<br><img src='redBall.gif' border='0'>");
}
}
?>
I have not included all of the code, obviously, I have just pared it down to what is giving me the problem. This seems like a simple function so I just figured my mistakes are in using JavaScript inside the PHP page?
Any help is greatly appreciated.
Thanks!
George