How can I add session variables for the subject field and the body of the e-mail Message?

How can I add session variables for the subject field and the body of the e-mail Message? Tried several combinations, but do not seem to correct the syntax.

This is the code I have. I need to change all the form variables in $msg in session variables. The $to part is supported. What remains are the $subject and $msg fields.

$à = « à : ». $_SESSION ["toemail"];
$subject = '$firstname $lastname, your registration details ';
$from = "from: [email protected]"; "
$msg = "Dear $title $firstname $lastname\r\n\nThank for the registration for the design of your dream Home.\r\nWe have received this following details details of you-\r\n\nClient-\r\n\nOccupation: $occupation \r\nPhone No.: $phone \r\nE-mail: $email\r\n\nPresent $ location: \r\n location\r\n\nPresent address: \r\n$ address\r\n\n\nFollowing are specified by you - design requirements \r\n\nBasic Features\r\n\nNo." floors: $floors\r\nNo. of bedrooms: bedrooms\r\nNo of $. of bathrooms: $bathrooms\r\nFloor region: $sqft\r\n\nFurther Suggestions: $ Plan\r\n\nSplit one further\r\n\n\nType floor: $splitfloor\r\n-remarks: $splitfloorremarks\r\nOpen floor: $openfloor\r\n-remarks: $openfloorremarks\r\n\n\nList of the rooms to be Included\r\n\nFoyer: $foyer\r\n-remarks: $foyerremarks\r\nDrawing: $drawing\r\n-remarks: $ alive drawingremarks\r\nFormal: $formalliving\r\n-comments : $ alive formallivingremarks\r\nFamily: $familyliving\r\n-remarks: $familylivingremarks\r\nHome Office: $homeoffice\r\n-remarks: $homeofficeremarks\r\nDining: $dining\r\n-remarks: $diningremarks\r\nMaster room: $master\r\n-remarks: $masterremarks\r\nMaster bathroom: $masterbath\r\n-remarks: $masterbathremarks\r\nMaster Dressing: $masterdress\r\n-remarks: $masterdressremarks\r\nBedroom: $bed\r\n-remarks: $bedremarks\r\nBathroom: $bath\r\n-remarks: $bathremarks\r\nDress: $dress\r\n-comments : $dressremarks\r\nStudy: $study\r\n-remarks: $studyremarks\r\nLibrary: $library\r\n-remarks: $libraryremarks\r\nPowder room: $powder\r\n-remarks: $powderremarks\r\nPrayer room: $prayer\r\n-remarks: $prayerremarks\r\nKitchen: $kitchen\r\n-remarks: $kitchenremarks\r\nPantry: $pantry\r\n-remarks: $pantryremarks\r\nUtility/area of work: $utility\r\n-remarks: $utilityremarks\r\nBalcony: $balcony\r\n-remarks: $balconyremarks\r\nStore: $store\r\n-remarks: $storeremarks\r\nLaundry : $laundry\r\n-remarks: $laundryremarks\r\nVeranda: $veranda\r\n-remarks: $verandaremarks\r\nCar porch: $carporch\r\n-remarks: $carporchremarks\r\nGarage: $garage\r\n-remarks: Theater garageremarks\r\nHome $: $theater\r\n-remarks: room of $theaterremarks\r\nMaid: $maid\r\n-remarks: $maidremarks\r\n\nOther general remarks: $general\r\n\nPlease note that the fields have been left blank in your form will be considered undecided details and used in discretion.\r\nIf of the architect , it better to add more later, design requirements please feel free to reply to this email with the details. « ;
$fla = mail ($to, $subject, $msg, $from);

Thanks in advance!

askintrades wrote:

How can I add session variables for the subject field and the body of the e-mail Message?

What you want to do? Given the nature of your question, it seems that you probably don't know what a session variable is used. The PHP manual describes the purpose of sessions here: http://docs.php.net/manual/en/intro.session.php.

I need to change all the form variables in $msg in session variables. The $to part is supported. What remains are the $subject and $msg fields.

$à = « à : ». $_SESSION ["toemail"];

Why do you need to change the form variables in session variables? They are already stored in session variables, or they come directly from the form?

The $to part is not supported. When you pass $to to the mail() function, it should contain only an e-mail address, not a string that begins with "to:

Tags: Dreamweaver

Similar Questions

Maybe you are looking for