Hello!
Well...let's start:
I'm a newbie at PHP...tried out some guides and forums but no good.
I want to get a form where you have a drop down menu which selects the playlist and a box where you can type in the episode number (and a submit button). That leads to the PHP file which uses ifs. Meaning, "if $episode = 2, echo episode2.flv"
Let me put it in code form:
<html><body>
<h4>Title Here</h4>
<form action="process2.php" method="post">
<select name="playlists">
<option>Playlist1</option>
<option>Playlist2</option>
<option>Playlist3</option>
</select>
Episode: <input name="episode" type="text" />
<input type="submit" />
</form>
</body></html>That takes me to process2.php:
<?php
$playlists = "Playlist1";
if (
$episode == "1" ) {
echo "E1!<br />";
}
if ( $episode == "2" ) {
echo "E2!<br />";
}
if ( $episode == "3" ) {
echo "E3!<br />";
}
echo "Future back link here</a>";
?>For that, it works PERFECTLY
But...I want to replace the "E#!"s with this:
<script type="text/javascript" src="swfobject.js"></script> <div id="player">PLaylist# - Episode#</div> <script type="text/javascript">var so = new SWFObject('mediaplayer.swf','mpl','480','272','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','272');
so.addVariable('width','480');
so.addVariable('file','playlist#episode#.flv');
so.addVariable('logo','watermark.png');
so.addVariable('searchbar','false');
so.addVariable('showstop','true');
so.addVariable('link', 'dllink.flv');
so.addVariable('showdownload','true');
so.write('player');
</script>So together it's like this:
<?php
$playlists = "Playlist1";
if (
$episode == "1" ) {
echo "<script type="text/javascript" src="swfobject.js"></script> <div id="player">PLaylist# - Episode#</div> <script type="text/javascript">var so = new SWFObject('mediaplayer.swf','mpl','480','272','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','272');
so.addVariable('width','480');
so.addVariable('file','episode1.flv');
so.addVariable('logo','watermark.png');
so.addVariable('searchbar','false');
so.addVariable('showstop','true');
so.addVariable('link', 'dllink.flv');
so.addVariable('showdownload','true');
so.write('player');<br />";
}
if ( $episode == "2" ) {
echo "E2!<br />";
}
if ( $episode == "3" ) {
echo "E3!<br />";
}
echo "Future back link here</a>";
?>But that gives me an error code where the first echo line is.
Any ideas on how I can fix this?
Edit:
Also, I've noticed something about MP4 videos. Can I just replace the FLV file url in my current code with an MP4 file url and have it play correctly? Or is there some other way that MP4 files play through the JW Media Player?

Do this a different way.
Instantiate the player once.
Load a file or playlist with a drop-down menu or a form entry box.
See the code referenced in my last post in this thread: http://willswonders.myip.org:8085/php/FamilyTime_faded_xmlHTTP.html for a drop-down menu (it's at the bottom of the page code).
See the code referenced here: http://willswonders.myip.org:8085/php/Basher.html for a text entry box.