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["name"];
$Country = $_POST["country"];
$EmailAddress = $_POST["email"];
$filename = "MembersLog.txt";
$handle = fopen ($filename, "a+"
;
$todaydate = date("Y-m-d H:i:s"
;
$visitorInfo = $HTTP_SERVER_VARS['REMOTE_ADDR'];
fwrite($handle, "\r\n" . $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 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["name"];
$Country = $_POST["country"];
$EmailAddress = $_POST["email"];
$filename = "MembersLog.txt";
$handle = fopen ($filename, "a+"
$todaydate = date("Y-m-d H:i:s"
$visitorInfo = $HTTP_SERVER_VARS['REMOTE_ADDR'];
fwrite($handle, "\r\n" . $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