I have a simple flash form I put together (can be viewed at http://alexjewell.com/beta3/form.swf). I have 4 input text boxes (name1, email, phone, and message1). Frame 1 is the form, frame 2 is the success message, and frame 3 is the message failed frame. The submit button has the following ActionScript attached to it:
NOTE: I used loadVariablesNum first. That didn't work, so I switched to loadVariables.Code:on (release) { if (name1 == "" || email == "" || phone == "" || message1 == "") { gotoAndStop(3) } else { loadVariables("forms.php", 0, "POST"); gotoAndStop(2); } }
The if/else statement works ; if all the fields are not filled in, it goes to frame 3 and says to fill them in. However, the most important part is that which doesn't work : the submission never actually shows up in my email! Here's the PHP code for forms.php (I pretty much use this same template for all of the HTML forms I do, and it works...so I know the problem lies in the flash side of the project):
Any ideas? Thanks.Code:$to = 'alex@alexjewell.com'; $subject = 'AlexJewell.com Contact'; $ip = $_SERVER['REMOTE_ADDR']; function getInputs($input){ global $$input; $$input = $_POST[$input] ? stripslashes($_POST[$input]) : 'No '.ucwords($input);} getInputs('name1'); getInputs('email'); getInputs('phone'); getInputs('message1'); $name = $name1; $message = $message1; $fullMessage = 'Name: '.$name."\n\n". 'Email: '.$email."\n\n". 'Phone: '.$phone."\n\n". 'Message: '.$message."\n\n\n". 'IP: '.$ip; $fromm = $name.' <'.$email.'>'; $h = "From: $fromm\r\nReply-to: $email\r\nX-mailer: ".phpversion(); mail($to,$subject,$fullMessage,$h)




Bookmarks