PDA

View Full Version : PHP Mail form - Simple but troublesome



The Waiter
August 7th, 2006, 06:00 PM
OK - I didn't want to post my email the first time but I guess I already get loads of spam so a bit more can't hurt - I just want this naughty PHP thing to work:

PHP code is:

<?php
$sendTo = "tantrumfantasies@yahoo.com";
$subject = "Everyday Photography";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>

Submit button code in flash is:

on (release) {
form.loadVariables("email.php", "POST");
}

Code on 'form' movie is:

onClipEvent(data){
_root.nextFrame();
}




Does anyone see anything wrong with this now?
I reckon it's fine - my variables are marked correctly within my 'form' movie...
the only thing I think could possibly be poo about my set-up is the flash code is all within another movie titled 'form_page' instead of sitting on the main stage.

I test it and the mail never arrives.

sambi
August 24th, 2006, 12:11 AM
try using the complete URL for the "email.php" address ie;"http://yoursite.com/email.php"

also try

this._parent.nextFrame();

rather than

_root.nextFrame();

if the responder isn't working.

- |Flash Man| -
August 24th, 2006, 12:27 AM
hmm try this on the button in flash

on(release){
loadVariablesNum("email.php", "0", "POST");
}