I have a nifty javascript page that detects if the user has the flash player and passes a variable in the url like this:
if ( MM_FlashCanPlay ) {
window.location.replace("home.php?flash=1");
} else{
window.location.replace("home.php?flash=0");
}
The home.php page opens up just fine with the variable set in the url. The problem I am having is getting home.php to get the variable. If $flash=1, I want the flash movie to play. If $flash=0, I want to display a jpeg. Here is my code that only displays the jpeg. What am I doing wrong?
<?php
function getBanner( $flash )
{
if( !$flash )
{
echo( " / <img> tag/ " );
}
else
{
echo( " / code to display flash movie / " );
}
}
?>