TurtleCreek
01-15-2005, 11:39 PM
I need help!!! I am new to PHP and I am trying to fashion together a contact form that will pass the variables from Flask into a text file. For some reason, though, the PHP file runs and creates the text file but none of my variables are getting written into the file. Below is the code I have in my PHP file:
<?php
$f=fopen("turtlecreek.txt","a");
fwrite($f,"*****************************\r\n");
fwrite($f,"First Name:\t"$_POST['fname']"\r\n");
fwrite($f,"Last Name:\t"$_POST('lname')"\r\n");
fwrite($f,"Address:\t"$_POST['addr']"\r\n");
fwrite($f,"City:\t"$_POST['city']"\r\n");
fwrite($f,"State:\t"$_POST['state']"\r\n");
fwrite($f,"Zip Code:\t"$_POST['zip']"\r\n");
fwrite($f,$_POST['dayph']);
fwrite($f,$_POST['evenph']);
fwrite($f,"Email Address:\t"$_POST['email']);
fwrite($f,"Contact Method Preferred:\t"$_POST['cntmeth']);
fwrite($f,$_POST['mess']);
fclose($f);
?>
As for my Flash end, I have a submit button which, when clicked, executes the LoadVariables action.
on (release, releaseOutside) {
loadVariablesNum("Process_Form.php", 0, "POST");
}
I have the form as a movie clip and the frame is stopped until the OnClipEvent(data) executes, at which time the frame advances forward two frames. What am I doing wrong?
<?php
$f=fopen("turtlecreek.txt","a");
fwrite($f,"*****************************\r\n");
fwrite($f,"First Name:\t"$_POST['fname']"\r\n");
fwrite($f,"Last Name:\t"$_POST('lname')"\r\n");
fwrite($f,"Address:\t"$_POST['addr']"\r\n");
fwrite($f,"City:\t"$_POST['city']"\r\n");
fwrite($f,"State:\t"$_POST['state']"\r\n");
fwrite($f,"Zip Code:\t"$_POST['zip']"\r\n");
fwrite($f,$_POST['dayph']);
fwrite($f,$_POST['evenph']);
fwrite($f,"Email Address:\t"$_POST['email']);
fwrite($f,"Contact Method Preferred:\t"$_POST['cntmeth']);
fwrite($f,$_POST['mess']);
fclose($f);
?>
As for my Flash end, I have a submit button which, when clicked, executes the LoadVariables action.
on (release, releaseOutside) {
loadVariablesNum("Process_Form.php", 0, "POST");
}
I have the form as a movie clip and the frame is stopped until the OnClipEvent(data) executes, at which time the frame advances forward two frames. What am I doing wrong?