I am a flash developer. As you probably know flash NEEDs php or another server side script to accomplish almost any saving or sending of data. I know how to pass my flash variables to a php doc. I do not know how to have php write a text or html doc to my server saving my user input data. Any help you wizards could give to a humble Action Script Developer would be greatly appreciated.
I have been looking through a lot of the info on that link. Thanks. Please bare with me i am a php idiot. I am learning more as time goes on, but i need to have this project done sorta yesterday. I was hoping there would be a simple solution. This is the php i use for a basic mail form. I understand this. Is there a way instead of sendTo i could say something like writeTo and then specify the file extention i would like assigned to it. <?php $sendTo = "" ; $subject = ""; $sendTo2 =""; $headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $message = $_POST["phone"] . $_POST["message"]; mail($sendTo, $subject, $message, $headers); mail($sendTo2, $subject, $message, $headers); ?>
A friend of mine gave me this code which (after configuring to my form) should do the trick. He got this code from someone at phpfreaks.com. The simple solution i needed! <?php $mode = file_exists('user_input.txt')?'a':'w'; // append if file exists otherwise create it $fp = fopen('user_input.txt',$mode); // open file fwrite($fp,print_r($_POST,true)."\r\n"); // dump the contents of the $_POST array to the file fclose($fp); ?>