Try harder, a lot harder
And check your facts.
Seriously, why even bother with something as stupid as a multiline string literal for outputing html, when php has the html mode that was made for this very purpose.
Do I smell copy and paste of some of the text?
Did you just explain about fprintf without explaining neither sprintf nor fopen?
That's just sad to do.
The mysql code uses pconect without explaining it. It also never shows the REAL error message that mysql has at the connect error.
And please, I am fairly sure that insert does not use the keyword SET...
And php scripts does not need to close the db connection as you wrongly claim, php closes it for you at script end. The error you describe is about something different.
The order by clause does not use a table name...
And how does the explode and implode functions have anything to do with mysql?
Also, please remove the stupid intro animation, we don't want to watch it, we want to read.
Please, learn enough actionscript to make a proper jukebox, song specific start and stop buttons? Get real.