Results 1 to 2 of 2

Thread: friends i have a problem on mail function.....

  1. #1
    Join Date
    Nov 2012

    friends i have a problem on mail function.....


    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....

    here is my code for sending mail
    $subject ="Feedback";
    $message1="\r\n".$name."selected \r\n";
    foreach ($_SESSION["musicgenre"] as $MG)
    $message3 .=$MG.",";
    $message5="Emotions Menu:";
    foreach ($_SESSION["emotions"] as $EM)
    $message6 .=$EM.",";
    $message8="Sound Effects Menu:";
    foreach ($_SESSION["soundeffects"] as $SE)
    $message9 .=$SE.",";
    $mess2="Instruments Menu::";
    foreach ($_SESSION["instruments"] as $IM)
    $mess3 .=$IM.",";
    $mess6="Vocals Menu:";
    foreach ($_SESSION["vocals"] as $VC)
    $mess7 .=$VC.",";
    $message="\r\n".$message1."\r\n".$message2.$message3."\r\n".$message4."\r\n".$message5.$message6."\r \n".$message7."\r\n".$message8.$message9."\r\n".$mess1."\r\n".$mess2.$mess3."\r\n".$mess4."\r\n".$me ss5."\r\n".$mess6.$mess7."\r\n".$mess8."\r\n\r Name:".$name."\r\n Mailid:".$email."\r\n Address:".$addressLine1."\r\n".$addressLine2."\r\n City/State/Zip:".$city_state_zip."\r\n Phone Number:".$phone."\r\n Comment:".$yourcomments;
    $message = wordwrap($message, 70, "\r\n");
    mail($to, $subject, $message);

  2. #2
    Join Date
    Sep 2008
    Don't forget to add session_start(); to the top of this script. Otherwise, I'm not even sure how you're able to access any of the session variables.

    For clarity, could you include selectorder.php and ordercomplete.php? Also, could you explain exactly which fields are displaying as expected?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles