This topic is locked

Changing sessions to have description in front

2/7/2008 6:30:19 PM
PHPRunner General questions
M
mmponline author

I have the following event sending me a mail to admin:
Works fine:

$adminemail="test@mymail.co.za";

$message="This is a progress report on your project. Please take action as required:
".$_SESSION["ProjID"]." ".$_SESSION["ProjectType"]." ".$_SESSION["Company"]." ".$_SESSION["ProjEmail"]." ".$_SESSION["RespPerson1"].":\r\n";

$message .="";

$subject="Progress Report from MMP";
foreach($values as $field=>$value)

$message.= $field." : ".$value."\r\n";



mail($email, $subject, $message);

mail($adminemail, $subject, $message,"From: mmp@mmponline.co.za");
// return true if you like to proceed with adding new record

// return false otherwise

//********** Redirect to another page ************

header("Location: MMPProjects_list.php?a=return");

exit();


I have 3 questions:

  1. How do I add a description in front of each session variable: Eg.
    ...

    Project ID ".$_SESSION["ProjID"]." " The type of project: .$_SESSION["ProjectType"]." ".$_SESSION["Company"]." ".$_SESSION["ProjEmail"]." ".$_SESSION["RespPerson1"].":\r\n";

    $message .="";

    ...
  2. I want this e-mail to be sent to the field in the ProjEmail field (In adisfferent table carried here by the session)
  3. A e-mail to the Logged on user as well.
    Thanks for any help.