Graxeon Posted June 2, 2008 Share Posted June 2, 2008 First off, hello! Alrighty then: I'm a complete newbie at PHP. I was messing around with my videos and I wanted to organize them a bit for online use. So here is what I'd like to do: I have FLV videos playing through a flash player whos name I can't give out apparently because of the advertising rule....but I'll give the code for it later on. Now, I can get those FLV videos working all nice and dandy but I have to create multiple pages for each video since I was just using HTML. However, with PHP I can, of course, make it a bit easier. I'd like this set-up: <html> <head> <title></title> </head> <body> <h4>Title</h4> <form action="process.php" method="post"> <select name="videos"> <option selected="selected">Select a playlist</option> <option>Playlist1</option> <option>Playlist2</option> <option>Playlist3</option> </select> Video #: <input name="episode" type="text" /> <input type="submit" value="Submit Query" /> </form> </body> </html> Now with that...I'd like to make it compatible with this flash player: <script type="text/javascript" src="swfobject.js"></script> <div id="player">PlaylistX - episodeX</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','playlistXepisodeX.flv'); so.addVariable('logo','WATERMARK.png'); so.addVariable('searchbar','false'); so.addVariable('showstop','true'); so.write('player'); </script> So in the end, I'd like a PHP file which takes that form's (first code I gave) inputs and have it output that flash player code but with the specified video implemented. I don't mind using the entire flash player code per video, I'd rather have a huge file than a million of them I tried using the IF and ARRY things but with not much of an outcome. I thought that if I said something like "if videos = Playlist1 and episode = 1 then final output that the user would see is this: <script type="text/javascript" src="swfobject.js"></script> <div id="player">Playlist1 - episode1</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','playlist1episode1.flv'); so.addVariable('logo','WATERMARK.png'); so.addVariable('searchbar','false'); so.addVariable('showstop','true'); so.write('player'); </script> So umm...can someone help me with this? Idk what this would be called so idk what to search for . Quote Link to comment Share on other sites More sharing options...
paulman888888 Posted June 2, 2008 Share Posted June 2, 2008 first of all start reading the PHP manual. GOOGLE it and read it all. It should help but any more errors come back here Quote Link to comment Share on other sites More sharing options...
revraz Posted June 2, 2008 Share Posted June 2, 2008 This sounds doable. Do you have a Database that has all the info of the video? If so, you can load them in and build the page based on that information. Quote Link to comment Share on other sites More sharing options...
Graxeon Posted June 2, 2008 Author Share Posted June 2, 2008 first of all start reading the PHP manual. GOOGLE it and read it all. It should help but any more errors come back here Well...my main problem is finding out what this is even called. Looking through a guide aimlessly when you're a newbie is pointless without some kind of tip. Been looking through that manual for a while now and it's nothing pertaining to me. What I need is a way of executing that flash player script within the the echo thing. This sounds doable. Do you have a Database that has all the info of the video? If so, you can load them in and build the page based on that information. No, I don't have a database. Would you mind explaining how I can get that database built? I'd much rather code it myself (meaning all I need is an editor) because I'm not up for purchasing services atm. I'd really just like a way of pulling this off: if videos = Playlist1 and episode = 1 then final output that the user would see is the video "Playlist1Episode1" Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 2, 2008 Share Posted June 2, 2008 Check if your server has MySQL. Quote Link to comment Share on other sites More sharing options...
Graxeon Posted June 2, 2008 Author Share Posted June 2, 2008 Check if your server has MySQL. I'm using XAMPP just to save time from uploading. Will that do? (since it has a bunch of stuff within it) Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 2, 2008 Share Posted June 2, 2008 XAMP has MySQL in it, so yeah, it should work. Quote Link to comment Share on other sites More sharing options...
Graxeon Posted June 2, 2008 Author Share Posted June 2, 2008 XAMP has MySQL in it, so yeah, it should work. Ok, so how would I go about using it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.