I am writing a type of mail form in AS2 of Flash CS4.
I collect two variables (nameCli and messageCli)
I setup a "sending button" to appear ONLY when there is a minimum of characters (2) under nameCli AND a minimum of 10 characters in messageCli.
When that button is pressed I POST these two vars tru email_lv to email2.php.
I do this check to be absolutely sure that these vars have contents.
It works and tests well on several computers (PCs) under XP, Vista and 7
I haven't tested on a Mac
Under IE and Firefox 3.0.xx
I get the email with the correct values.
The PROBLEM: somehow, now and then I get (and worse, my client, to whom I wrote this app, gets) an "empty" email.
That is, the subject of these emails are: "Request from" and blank. No name.
The message is also blank.
Since I know, with no doubt that these vars have content, otherwise the send button wouldn't come up, I am puzzled.
I have no idea of what OS or Browsers these users have.
Question: Would be possible that some browsers would "block" the vars sent via POST?
Any suggestion is appreciated.
$subject= 'Request from ' . $_POST["nameCli"];
$message = $_POST["messageCli"];
mail($to, $subject, $message, $headers);
mail($to2, $subject, $message, $headers);
I've never had that happen that I remember - 10 years pro experience. Flash posts the same as an html form.
There's something wrong with the flash or the php. I'm not a php guy so I can't help you with the php. You should post it in a php forum to get checked.
Test your posts by uing "send" instead of "sendAndLoad" to a new browser window and have the php display the vars being posted. That way you know for sure what php is successfully receiving from your flash. If that's working and you can't break your flash - get it to post with nothing in the vars, you know it's a php-email issue.