Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Java PHP file variable, load video

3 replies [Last post]
Reply

Hi i'm trying to use a php variable as filename.
but im not able to get this to work.
The file name the video should load is decided by : Variable.

This is my result:
http://imageshack.us/f/85/asdasdic.png/

?php
$Video= $input[$rand_keys[0]];
?>

<script type='text/javascript'>
var whatever = "<?= $video ?>";
jwplayer('mediaspace').setup({

'flashplayer': 'player.swf',
'file': '<%=whatever%>', //<-----
'controlbar': 'bottom',
'width': '470',
'height': '320',
'skin' : 'nemesis.zip'
});

</script>

Reply

BUMp

Reply

Hi John

did u had any luck with that?

i'm having the same problem

Reply

Try to use echo and it should work.

For ex:

<?php
$Video
= $input[$rand_keys[0]];
echo
"<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': 'player.swf',
'file': '"
.$Video."',
'controlbar': 'bottom',
'width': '470',
'height': '320',
'skin' : 'nemesis.zip'
});
</script>"
;
?>

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options