Witam,
Dodałem do formularza nowe pole select, zrobiłem tak żeby zależnie od wybranej np. osoby mejl szedł do przypisanego jej mejla i wygląda to jak poniżej, ale problem jest taki że na mejla mi przychodzi oprocz podanego imienia i telefonu wartosci z pola select tj. "recipient - > Tomek", a tego nie chcę. Co zrobić(IMG:
style_emoticons/default/questionmark.gif) ?
<form name="New_Form" action="formtoemail.php" method="post" enctype="application/x-www-form-urlencoded" onsubmit="return New_Form_CF();"> <p class='formtext'>Imię:
</p><input type="text" name="Imię" value="" maxlength="55" style="width: 240px" /> <p class='formtext'>Telefon (max. 9 cyfr):
</p><input type="text" name="Telefon" value="" maxlength="9" style="width: 240px" /> <div align="left" style="padding-left: 6px; padding-top: 6px;"><input type="submit" id="button" value="Wyślij" /></div>
while (@list
($var,$val) = @each($_POST)) { $temp = '';
foreach($val as $newval){
$temp .= "$newval ";
}
$message .= "$var: $temp\n";
} else {
$message .= "$var: $val\n";
}
}
'recipient_1' => 'asz0988@hotmail.com',
'recipient_2' => 'aszestakowski@gmail.com',
'recipient_3' => 'aszestakowski@gmail.com'
);
$your_email = $recipients[$_REQUEST['recipient']];
// send the email
mail($your_email, $subject, $message, "From: $name <$email>\nMIME-Version: 1.0\nContent-type: text/html; charset=UTF-8");