close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

sessions to email

Thread began 6/24/2019 9:56 am by lr_leal239405 | Last modified 6/24/2019 1:57 pm by Ray Borduin | 206 views | 1 replies |

lr_leal239405

sessions to email

picking on your brains on this one - I'm wanting to pass values from $_POST form values to the email file in the Templates block. But I noticed I would have to create a session variable name for each input field. That's quite a bit of work since there are over 300 fields (with several forms inside of the forms).

Is there an easier way or is that what I have to do?

Thanks for your help.

Sign in to reply to this post

lr_leal239405

I found the answer. I used:

$_SESSION['post-data'] = $_POST;

and then to post it on the email:

echo $_SESSION['post-data']['Machinecs'];

However, I used the for each:

php:
<?php

if(!empty($_SESSION['post-data'])) {
  foreach( 
$_SESSION['post-data'] as $pkey => $pval ){
    if (
get_magic_quotes_gpc()) $pval stripslashes((is_array($pval)?implode(", ",$pval):$pval));
          if (
$pval) {
?>
<tr valign="top">
<th style="font-family: 'Times New Roman', Times, serif; font-size: 16px;width: 134px; text-align: right; padding: 3px 10px 3px 3px; color: #666; font-weight: bold;"><?php echo(str_replace("_"," ",$pkey)); ?>:</th>
<td style="font-family: 'Times New Roman', Times, serif; font-size: 16px;padding: 3px; border-left: 1px solid #DDD; color: #000000;"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?></td>
</tr>
<br>
<?php
      
}
    }
  }
?>
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...