Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Posting FLASH movie info to PHP

Status
Not open for further replies.

rossmcl

Programmer
Apr 18, 2000
128
Hi,

I want to post variables from Flash to PHP script I created.

I have three text boxes (email address, name, country which I created into a movie clip (called form)


My flash code on my submit button after the visitor enters data into the text boxes is:

on (release) {
form.loadVariables("MembersDetails.php", "POST");
}


and the MembersDetails.php code is:

<?php

$Name = $_POST[&quot;name&quot;];
$Country = $_POST[&quot;country&quot;];
$EmailAddress = $_POST[&quot;email&quot;];


$filename = &quot;MembersLog.txt&quot;;
$handle = fopen ($filename, &quot;a+&quot;);
$todaydate = date(&quot;Y-m-d H:i:s&quot;);
$visitorInfo = $HTTP_SERVER_VARS['REMOTE_ADDR'];

fwrite($handle, &quot;\r\n&quot; . $todaydate . ' ' . $visitorInfo . ' ' . $EmailAddress . ' ' . $Name . ' ' . $Country);


fclose( $handle );

?>



===

Now I dont understand what is happening, because basically the variables are not going across into the txt file but the $todaydate and $visitorinfo in the PHP file are, ie the txt file IS being written to, but it is not writing the variables from my flash movie clip.

Any ideas what I am doing wrong?

Any help very much appreciated.
RM





 
i'm not 100% sure but i think you need brackets...

$Name = $_POST['name'];
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top