Trouble Passing Variables in PHP

I am having problems passing variables in PHP, and I think it has to do with the actionscripting (maybe).

The first script searches my MySQL datbase and gets the info via the variable item. So if script.php?item=1, then it searches in the table for the column with id 1. Then I have my dynamic text field, variable name = myvar, and the script.php will echo myvar=text (where text equals the column for the text from the corresponding id).

onClipEvent (load) {
loadVariables(“http://www.site.com/script.php?item=1”, this, “GET”);
}

It doesnt work though. Its not showing me the text, and the debugger is saying:


Warning</b>:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>/script.php</b> on line <b>14</b>

But if you actually go to the url, it shows myvar=text. So I dont see what the deal is here.

To test the basics, I made another script, script2, that prints out myvar=text and the text shows in the dynamic text field. I used the same onClipEvent (load) actionscript and it works, so Im really at a loss. Hopefully somoene can enlighten me.

I can show you guys each script if you need to see them.