this kind of script used to work with php versions older than 4.1 - see thread "php does not work" starting in 2002
You want to add at least
Code:
<?
/* ********************
* get all data from request *
***********************/
$nom_expediteur = $_POST["nom_expediteur"];
$email_expediteur = $_POST["email_expediteur"];
$sujet = $_POST["sujet"];
$message = $_POST["message"];
next you probably should add
Code:
/* *******************
* this solves a problem with multi-line messages
*******************/
$message = ereg_replace("\r", "\n", $message);
/************************
* and this stops idiots from sending "cheap blue pills" mails
* via your server
*********************/
if(ereg("[\r\n]", $email_expediteur)) exit;
You might get crippled accented characters in the mail - flash player sends them utf-8 encoded and your mail program might expect iso-latin-1 if not told otherwise (it might be clever enough to auto-detect, too)
If this happens, you would need to either utf8_decode the message or add a content-type header to the others.
Hi Musicman, thanks for what you did so far. Moreover, the provider told me that the register globals on the domain was off (is this a related issue?).
Second: I see that you substituted POST for GET; should I substitute it in the fla too?
Last: I didn't understood how to:
"utf8_decode the message or add a content-type header to the others"
If you are sending the information as GET then you can replace all of his $_POST[] variables with $_GET[] variables (although I would recommend sending as POST)
utf8_decode is a PHP function that will translate the text into a different format (ISO-8859-1).
Well... er, sirs... can you please write down a simple php script and a little fla which validates email, subject, name and message (including also those utf8 decode/multiline/antispam whom you spake of)? That's all I want.
Tried on the net, but besides that damn script, nothing useful for my case; nothing useful here either (:-^
It will be really appreciated! I guess it will took 10 minutes for expert people; I'm stuck with that since feb 2! :-(
With that script you should see whether
- of course, you get mail at all
- accented characters arrive properly in the message text
- accented characters arrive properly in the subject