Hello,
Please, if anyone knows how to pass a Javascript integer variable as a parameter into php mysql_query. Below gg1 is successfully converted to an integer (i checked it using some maths additions), and now i need to pass this value to BirdID. The last line with innerHTML works fine if this php is fixed, i.e. if i put BirdID='2', it displays well.
Any help will be very much appreciated
function loadBirdData(bb)
{
var gg1 = parseInt(bb);
<?php
$var = mysql_query("SELECT Colour FROM birdstable WHERE BirdID = 'gg1' ");
$row = mysql_fetch_assoc($var);
?>
document.getElementById('content').innerHTML = '<?php "".$row['BirdColour']."</br>" ?>';
...
}