sending email using php (ima newb)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kageosx
Forum Newbie
Posts: 3
Joined: Sun May 21, 2006 8:53 am

sending email using php (ima newb)

Post 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 =)
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Post by GeXus »

Do you just want the other fields to be included in the body? Just make your $body = $var1 $var2 $var3, etc...
kageosx
Forum Newbie
Posts: 3
Joined: Sun May 21, 2006 8:53 am

Post by kageosx »

awesome, ill try that out.
kageosx
Forum Newbie
Posts: 3
Joined: Sun May 21, 2006 8:53 am

Post by kageosx »

thanks man, you totally saved my @$$!

worked perfectly. =)
Post Reply