Passing vars from Flash to HTML

I there. I seem to be having some problems passing variable from Flash to HTML.

In my movie I simply havea variable text box named ‘value’ and a button. The user types in some text and then when pressing the button it passes that variable to a new HTML page. The problem I’m having is the PHP part.

So again I’m passing the varilabe ‘value’.

I then send the variable using getURL:

//send variable
on (release){
getURL(‘http://localhost/middle.php4’,_blank,'GET’);
}

The middle.php4 conatins the following code
<title> Passing the Variable <? echo $value ?></title>

…and in the body contains a line:
The variable you should see is <? echo $value ?>

When looking this in the browser the <title> just prints it exactly has shown '<? echo $value ?>

where as the second line doesn’t show the value at all (i.e. The variable you should see is blank)

I tried adding the line $value = $_POST[‘value’] but that didn’t work.

Any other thoughts? Could there be something wrong with my PHP? I’m running on 4.3

why are you naming your files .php4, just name them .php

try using

<? echo $_GET['value'] ?>

Thanks for the reply. I tried the $_GET[‘value’]; and am still having the same issue.

The reason why I’m using php4 is because I have a program (Microsoft Picture IT) that uses the same extension. Whenever I try to edit my php files it alway opens it with Picture IT.

Is there any harm using the extension .php4?

Thanks again

only the fact that PHP might not recognize them as PHP files. And in that case they won’t get parsed as PHP files, unless you change the default extentions in the apache confd.http file…

yeah, I changed the default in the httpd.conf already to include .php4.

Right now my php files are working when talking to mySQL but I have no idea why it’s not working when echo’ing.

shouldn’t you be using something like this to send a value to a php page from flash?
[AS]MYbutton.onRelease = function() { //This is your submit button, change instance name to match.
buttonVars = new LoadVars();
buttonVars.value = your_var_to_be_sent; //use a textbox instance name, or a variable here.
buttonVars.send(“http://yoursite.com/value.php”, “_blank”, “POST”);
};[/AS]

It wokred!

I changed the httpd.conf back to it’s default and removed Picture IT and it’s now working witht he .php extension.

Thanks for all your helps guys.

:azn: