Hi,
I'm sure this is really simple to fix, but I just can't seem to get through it. I've got a basic Flash website which passes some variables to a PHP script. The variables are part of a contact form, and all I want the PHP to do is to send an email to my domain email address (which I've made info@mydomain.com in the code below).
Separate to the Flash sending the variables correctly to the PHP script (which I think is working but cannot yet verify), I can't get the PHP script to send an email. If I type in the URL of the PHP script, it displays "returnS=success", but I don't receive an email (I know it would only be a blank email, but I don't receive anything). I've also pretty much copied this code from another website I set up for a friend which has the PHP sending the email... :S
What am I doing wrong?! Thanks
<?php
$to = "info@mydomain.com";
$subject = "Website Query";
$name_field = $POST['name_field'];
$email_field = $POST['email_field'];
$message = $_POST['message_field'];
$body = "From: $name_field\nE-Mail: $email_field\nMessage: $message";
mail($to, $subject, $body, "From: $email_field");
echo "returnS=success";
?>