Hi I am building a javascript function in php. It is going swimmingly until I get to the part where I try to use the JS variable 'file' in the MD5() function..
the 'file' var works fine in the section of the code without the MD5().
Code: Select all
<?php
echo "<SCRIPT LANGUAGE=\"Javascript\">\n";
echo " <!--\n";
echo " function bg(file)\n";
echo " {\n";
echo 'window.location = "http://bitcast-g.bitgravity.com/suze/members/files/area3/members/VIDEOS/" + file + "?e='.$t.'&h='.MD5("xxxxxxxxx/suze/members/files/area3/members/VIDEOS/' + file + '?e=".$t).' "';
echo " }\n";
echo " //-->\n";
echo " </SCRIPT>\n";
?>
Code: Select all
<A href="javascript:void()" onClick="bg('2000_3475_1000.wmv');return true">Link</A>pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: