By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,373 Members | 1,792 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,373 IT Pros & Developers. It's quick & easy.

Session EMAIL

P: n/a
i have a multipage application. The Variables are stored in sessions
which then are generated to show the user the results from there i
would like the user to his submit and it be emailed back to
would i make that happen?

here is how i have my sessions stored
header("Cache-control: private");
$_SESSION['Page_7'] = $_POST;

and how they are displayed:

foreach ($_SESSION as $page=>$_POST)
echo "<div class=\"h3\">$page</div><br>";
foreach ($_POST as $field=>$value)
echo "$field: $value<br>";

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
So what is the problem? the email part or the dispaly part? if it is
the email - have you looked at mail()?

Jul 17 '05 #2

P: n/a
the email part is my question........ i know how to set up mail() just
not how i would call from the $_SESSION variables

Jul 17 '05 #3

P: n/a
To include the values of $_SESSION in the email message would be
similar to your code for displaying the values, except instead of
echoing each one, you'd add it to a string, then send that string as
the email message.

Something like:

$message = "";
foreach ($_SESSION as $page=>$_POST) {
$message .= "Page: $page\n\n";
foreach ($_POST as $field=>$value) {
$message .= "$field: $value\n";

mail("yo******", "Session Info", $message);

Hope that helps.


Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.