I did try this and when I hit the send button nothing happens. Ideas? I followed it step by step using php script. I uploaded the script to the same dir as the swf file.
...sends all variables located in the MAIN timeline, so thats where the form should be. It also wont work if you have the textfields and submit buttons in different timelines. Or have the form in a movieclip.
Ok i tried to chmod to 755 no luck. I did look at the flash page and it has the input field on layer 37 and the submit and clear buttons on layer 7. I also the submit button only is a movie clip and the button itself is inside it. I added the actions there. All fields are the same in the script as in the flash action. Ideas?
Ok it works. I have a problem though, the text stays there and it does not look like it sends when you click send. I hit it 10 times got 10 e-mails but average person would think it did not work at all. How do I get it to say sent fine and clear the fields out.
I also added more fields, I have name,company,e-mail and message now. I changed the script for this but missed something because it won't work now. this is the script I did. I saw email already in it so I named the variable of the email on the form to email2.
Nope did not work. I just wanted to add more fields and also when I tried either script when i hit send the text stays I do not get the sent message... This is the script I have on the button now.:
on (release) {
subject = "Testing Mail";
this.loadVariables("http://www.mainsite.com/simplemail.php", "POST");
}
and this is the php code:
$email ="support@mainsite.com";
$subject = $HTTP_POST_VARS['subject'];
$name = $HTTP_POST_VARS['name'];
$company = $HTTP_POST_VARS['company'];
$email2 = $HTTP_POST_VARS['email2'];
$message = $HTTP_POST_VARS['message'];
mail($email, $subject, $name, $company, $email2, $message);
echo "mailstatus=The mail has been sent!&thescript=done&";
?>
I try this code for php and it works but all i get is the message, and when I hit send nothing says it was sent.
<?php
$email ="support@mainsite.com";
$subject = $HTTP_POST_VARS['subject'];
$message = $HTTP_POST_VARS['message'];
mail($email, $subject, $message);
echo "mailstatus=The mail has been sent!&thescript=done&";
?>
The echo is returned to the timeline that sent the variables ( where the button is ), so thats where the textfield called mailstatus has to be ( or textfield thescript if you want to see that too ).
Ok I did this but still when I hit submit nothing happens no e-mail recieved and the test stays in the boxes. I have name,company,e-mail and message with submit and clear buttons.
I can just say that the mailstatus textfield should be in the same timeline as the send script, and needs to have a variable name of mailstatus for it to work. I dont know why you dont get any emails though ( and strange that you got emails before ( with the message just ) ).