close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Email template repeating data

Thread began 5/11/2010 11:06 pm by mora398588 | Last modified 5/12/2010 1:28 pm by Jason Byrnes | 711 views | 1 replies |

mora398588

Email template repeating data

I need assistance with a problem I am having with my email template. I am uncertain as to why blocks of data are repeating in the body of the email template. I have attached a copy of the email template and a sample email received.

Attached Files
Email Sample.zip
registration.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in the template you have the following:

php:
<?php

foreach( $_POST as $pkey => $pval ){
  if (!
RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes))  {
?>
                    <tr valign="top">
                        <th style="font-family: 'Times New Roman', Times, serif; font-size: 12px;width: 134px; text-align: right; padding: 3px 10px 3px 3px; color: #666; font-weight: bold;">Welcome:</th>
                        <td style="font-family: 'Times New Roman', Times, serif; font-size: 12px;padding: 3px; border-left: 1px solid #DDD; color: #444;"><p>Welcome to the HRConsortium Community as a new member or associate. You now have access to a wealth of valuable human resource management services, benefits and discounts that will greatly assist you in managing your business' HR needs.</p>
                        <p>We have provided your sign in information below for your records:</p>
                        <p>User Name: <strong><?php echo((isset($_POST["UserEmail"]))?$_POST["UserEmail"]:""?></strong><br>Password: <strong><?php echo((isset($_POST["UserPassword2"]))?$_POST["UserPassword2"]:""?></strong></p>
<p>It is highly recommended that you maintain your user name and password in a safe and secure location at all times. </p>
<p>The HRConsortium Family welcomes you! We look forward to providing the best in service to you and your business!!</p></td>
                    </tr>
<?php
  
}
}
?>




the first line:
<?php
if (!RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes)) {
?>


starts a loop. it will output anything inside the loop onece for each form element on your page.


To only show that region once, chagen that code block to:

php:
<?php

foreach( $_POST as $pkey => $pval ){
  if (!
RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes))  {
?>
                    <tr valign="top">
                        <th style="font-family: 'Times New Roman', Times, serif; font-size: 12px;width: 134px; text-align: right; padding: 3px 10px 3px 3px; color: #666; font-weight: bold;">Welcome:</th>
                        <td style="font-family: 'Times New Roman', Times, serif; font-size: 12px;padding: 3px; border-left: 1px solid #DDD; color: #444;"><p>Welcome to the HRConsortium Community as a new member or associate. You now have access to a wealth of valuable human resource management services, benefits and discounts that will greatly assist you in managing your business' HR needs.</p>
                        <p>We have provided your sign in information below for your records:</p>
                        <p>User Name: <strong><?php echo((isset($_POST["UserEmail"]))?$_POST["UserEmail"]:""?></strong><br>Password: <strong><?php echo((isset($_POST["UserPassword2"]))?$_POST["UserPassword2"]:""?></strong></p>
<p>It is highly recommended that you maintain your user name and password in a safe and secure location at all times. </p>
<p>The HRConsortium Family welcomes you! We look forward to providing the best in service to you and your business!!</p></td>
                    </tr>
<?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...