hii
i am trying to send mail using php. i have to mail the values selected on selectorder.php and mail that values in ordercomplete.php for that i stored all those values in session variables in selectorder.php and using those variables i’m trying to sena mail in ordercomplete.php, mail is coming but selected values are not adding to that mail and string values are adding to thet mail. but echoing that message variable i’m getting those values… please let me know where i did a mistake….
[B]here is my code for sending mail
<?php
$yourcomments=$_SESSION[“yourcomments”];
$name=$
$email=$_SESSION[“email”];
$addressLine1=$
$addressLine2=$_SESSION[“addressLine2”];
$city_state_zip=$
$phone=$_SESSION[“phone”];
$to=”
$subject =”Feedback”;
$othermusicGenre=$
$otheremotions=$_SESSION[“otherEmotions”];
$othersoundEffects=$
$otherinstruments=$_SESSION[“otherinstruments”];
$othervocals=$
$beatmenu=$_SESSION[“othervocals”];
$message1=”rn”.$name.”selected rn”;
$message2=”MusicGenre:”;
if(sizeof($
{
$message3=””;
foreach ($_SESSION[“musicgenre”] as $MG)
{
$message3 .=$MG.”,”;
}
}
$message4=”OtherMusicGenre:”.$othermusicGenre;
$message5=”Emotions Menu:”;
if(sizeof($
{
$message6=””;
foreach ($_SESSION[“emotions”] as $EM)
{
$message6 .=$EM.”,”;
}
}
$message7=”OtherEmotions:”.$otheremotions;
$message8=”Sound Effects Menu:”;
if(sizeof($
{
$message9=””;
foreach ($_SESSION[“soundeffects”] as $SE)
{
$message9 .=$SE.”,”;
}
}
$mess1=”OtherSoundEffects:”.$othersoundEffects;
$mess2=”Instruments Menu::”;
if(sizeof($
{
$mess3=””;
foreach ($_SESSION[“instruments”] as $IM)
{
$mess3 .=$IM.”,”;
}
}
$mess4=”OtherInstruments:”.$otherinstruments;
$mess5=”BeatMenu:”.$beatmenu;
$mess6=”Vocals Menu:”;
if(sizeof($
{
$mess7=””;
foreach ($_SESSION[“vocals”] as $VC)
{
$mess7 .=$VC.”,”;
}
}
$mess8=”OtherVocals:”.$othervocals;
$message=”rn”.$message1.”rn”.$message2.$message3.”rn”.$message4.”rn”.$message5.$message6.”rn”.$message7.”rn”.$message8.$message9.”rn”.$mess1.”rn”.$mess2.$mess3.”rn”.$mess4.”rn”.$mess5.”rn”.$mess6.$mess7.”rn”.$mess8.”rnr Name:”.$name.”rn Mailid:”.$email.”rn Address:”.$addressLine1.”rn”.$addressLine2.”rn City/State/Zip:”.$city_state_zip.”rn Phone Number:”.$phone.”rn Comment:”.$yourcomments;
$message = wordwrap($message, 70, “rn”);
mail($to, $subject, $message);
?>