Now I want to create some gadgets for google,myspace. Google uses JS so I can't embed into myspace etc. Now I need advice on what the best language or method to use. The gadget will need to make an SQL query back to my server. Flash seems my only option but I am not really fond on buying it nor pirating it, after an open source solution. PHP is my preferred language. Just advice i'm after guys no need for anyone to make it. Cheers.
You can't make request to mysql from flash or from JS. You should use theme JS <-> PHP <-> MySQL or Flash <-> PHP <-> MySQL.