PDA

View Full Version : Help to fix code to send variables to PHP


DigitalWallfare
11-29-2009, 12:51 AM
Hi all,

I'm trying to code a button to send information to a PHP search script page.

I was wondering if someone could take a look at what I've written so far and correct any mistakes, as I'm getting a lot of errors when compiling, then just seem to change when i look up what they mean and try to fix it. It's driving me banana's.

Here is my code:

var URL_request:URLRequest = new URLRequest("results.php");
URLRequest.method=URLRequestMethod.POST;

var County:String= "Galway";

var URL_vars:URLVariables = new URLVariables(County);
URL_vars.dataFormat=URLLoaderDataFormat.TEXT;

URL_request.data = URL_vars;
var_load.load(URL_Request);

function submitform(event:MouseEvent):void

If any one can straighten that mess out, I'd be hugely grateful.

Sam