Variables sent by POST dependent on Browser type/version?
Posted: Tue Mar 30, 2010 12:38 am
From Flash into PHP
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.
----
email_lv.sendAndLoad("email2.php",dummy_lv, "POST");
----
-----email2.php is:
<?php
$to = 'any@whomever.com';
$to2 = 'another@whomever.com';
$subject= 'Request from ' . $_POST["nameCli"];
$message = $_POST["messageCli"];
$headers = 'From: WebSite@clientserver.com'. "\n"
. 'Reply-To: doNOTreply@clientserver.com'. "\n"
. 'X-M ailer: PHP/'.phpversion() ."\n"
;
mail($to, $subject, $message, $headers);
mail($to2, $subject, $message, $headers);
?>
-----
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.
----
email_lv.sendAndLoad("email2.php",dummy_lv, "POST");
----
-----email2.php is:
<?php
$to = 'any@whomever.com';
$to2 = 'another@whomever.com';
$subject= 'Request from ' . $_POST["nameCli"];
$message = $_POST["messageCli"];
$headers = 'From: WebSite@clientserver.com'. "\n"
. 'Reply-To: doNOTreply@clientserver.com'. "\n"
. 'X-M ailer: PHP/'.phpversion() ."\n"
;
mail($to, $subject, $message, $headers);
mail($to2, $subject, $message, $headers);
?>
-----