Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2006
    Posts
    112
    Thanks
    0
    Thanked 0 Times in 0 Posts

    insert variables to php page

    Hi all,
    I'm having a problem. I want to have a single page holding this code for a Flash mp3 player...

    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','150','height','20','src','../singlemp3player?file=http://www.buildrebuild.com/audio/dirtyDeeds2.mp3','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','../singlemp3player?file=http://www.buildrebuild.com/audio/dirtyDeeds2.mp3' ); //end AC code
    </script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="150" height="20">
    <param name="movie" value="../singlemp3player.swf?file=http://www.buildrebuild.com/audio/dirtyDeeds2.mp3" />
    <param name="quality" value="high" />
    <embed src="../singlemp3player.swf?file=http://www.buildrebuild.com/audio/dirtyDeeds2.mp3" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="20"></embed>
    </object></noscript>


    What I want to do is send variables to this page from a link so I can change the "?file=http://www.buildrebuild.com/audio/dirtyDeeds2.mp3" variable each time so a different mp3 loads.
    I know you can write out code on the fly with javascripts getElementById etc but can you do it with PHP?

    The linked page will be in an iframe, so link would be...

    <iframe name="hydroponicPlayer" id="hydroponicPlayer" width="150" height="20" src="player.html?file=http://www.buildrebuild.com/audio/dirtyDeeds2.mp3" frameborder="0" scrolling="no"></iframe>

    and...


    <iframe name="hydroponicPlayer" id="hydroponicPlayer" width="150" height="20" src="player.html?file=http://www.buildrebuild.com/audio/yerMa.mp3" frameborder="0" scrolling="no"></iframe>


    player.html will always be the same page to be loaded into the "hydroponicPlayer" iframe...it's just the mp3 variable that needs changed on each link.

    Any help?...if you understood what I've rambled on about.
    Thx
    CB

  • #2
    Regular Coder
    Join Date
    Oct 2005
    Location
    Surrey, England
    Posts
    286
    Thanks
    2
    Thanked 2 Times in 2 Posts
    a bit more on the question asked...do you mean all you want to do is change the iframe url to a random .mp3 doc?

    also...if you do mean the above, are all the mp3's held in a database?
    Daniel Warner
    - - - - - - - - - -
    GuitarMart.co.uk - Free Online Classified Advertisement for Guitarists in the United Kingdom. Free Ads with a Free Photo.

  • #3
    Regular Coder
    Join Date
    Feb 2006
    Posts
    112
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    Got it sorted. The client isn't worried about the location of the MP3 being made available to the public so I just passed a variable in the URL link to the iframe and used $_GET['track']; in the iframe to receive the variable "track".

    Thx for the reply anyways,

    Best
    CB

    I really want to get a PHP and MySQL running though and do all my coding more securely in the near future.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •