PHP Mail Form Success

Ok so what I want to do is move my swf to the next page if sending an email using php was succesful. The code I have for the submit button is:

[AS]
sendButton.onPress = function(){
loadVariablesNum(“mailTut.php”, 0, “GET”);
}
[/AS]

How would I check to see if the email was sent succesfully. This is the php code


<?
$Name = $_GET['name'];
$Email = "www.creativeimpulses.com";
$Message = $_GET['message'];
$Subject = "Test E-mail Tutorial";
$Header = "From: $Name <$Email>";
$new = mail($Email, $Subject, $Message, $Header);
?>

is there an if(success) statement in PHP or something similar? Or could I pass a variable back to flash when the mail gets sent and flash would go to the next page if the value of that variable was true…any suggestions very welcome. Thanks

PS- is the creativeimpulses.com line formatted correctly?

Hmmm,

Top of my head something like

in your php-file
//check for $new
if ($new) {
echo “var1=good”;
}else{
echo “var1=failed”;
}

Then check “var1” in flash for good or failed.

ps: iwould replace “www.creativeimpulses.com” for info@creativeimpulses.com

great. thanks a bunch