Page 1 of 1

sending email using php (ima newb)

Posted: Sun May 21, 2006 9:03 am
by kageosx
ok, im brand new to php and i need to have mail sent through php.

i am sending the variables from flash to the php code, an i have 10 fields that get filled in in flash then sent to the php to send the email.

the problem im running into is that i can only get the email to send up to 2 fields and it ignores the rest of them.

here is the code im currently using in php:

<?php

$sendTo = "me@me.com";
$subject = "test";


$headers = "From: " . $_POST["name"] ."<" . $_POST["email"] .">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$name = $_POST["name"];

mail($sendTo, $subject, $name, $headers);

?>

i just need to know what i need to do to get it to add the other 9 fields to the sent email along with the name field.

thanks =)

Posted: Sun May 21, 2006 9:19 am
by GeXus
Do you just want the other fields to be included in the body? Just make your $body = $var1 $var2 $var3, etc...

Posted: Sun May 21, 2006 9:29 am
by kageosx
awesome, ill try that out.

Posted: Sun May 21, 2006 9:40 am
by kageosx
thanks man, you totally saved my @$$!

worked perfectly. =)