echo "<param name='FlashVars' value='mp3=Slipknot-Duality.mp3&bgcolor1=$rgb\&showinfo=1&autoplay=0&showstop=1&showvolume=1'>";

I am having a problem getting my bgcolor1=$rgb to be evaluated

I know that $rgb has a value in it because i am using print_r($GET) and it is evaluated as the correct value

how do i get the variable to pass as a paramater in the html coding? I have tried everything I can think of. Probably just missing something simple.

That would only work if register globals is on. Also you have the following errors:

- erroneous backslash before the ampersand
- not using urlencode for URL variables
- not using the proper HTML representation for the ampersand

So try this:

echo "<param name='FlashVars' value='mp3=Slipknot-Duality.mp3&amp;bgcolor1=".urlencode($_GET["rgb"])."&amp;showinfo=1&amp;autoplay=0&amp;showstop=1&amp;showvolume=1'>";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.