close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add url variable to link in email template used for recordset loop in Send Email Behaviour

Thread began 4/29/2019 10:02 am by s.joiner74419001 | Last modified 5/01/2019 12:51 pm by Ray Borduin | 70 views | 5 replies |

s.joiner74419001

Add url variable to link in email template used for recordset loop in Send Email Behaviour

I have an email behaviour that is triggered by a ‘MySQLi Update Record’ behaviour. The email recipients are built from a recordset loop.

The email template that is used for the recipient email has a link in it that each recipient clicks to direct them to a web-form.

The problem I am having is I want to bind each recipients Database ID to a URL variable in the link they click so I can personalise the web-form ( pre-populate some of the form fields ) on the webpage they each get directed to.

Because the emails are sent via the recordset loop I can not work out how I can get the correct url variable ( ID ) into the link in each generated email.

What I am currently doing is directing them to a page which displays a list of all recipients where they select their name from the list which directs them to the web-form page. This works because I can directly access the links which is built from a repeat region from a record set and so I can place the ID from each database record in a URL variable in the link.

I did enquire about this over a year ago with Ray and he advised that I would probably need a support ticket. after a couple of failed attempts to connect on Skype, I had to put the project on hold


Thanks in Advance

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the page where you have the email server behavior applied as well as the page used for the body. I'll take a look and suggest how to add the data.

Sign in to reply to this post

s.joiner74419001

Hi Ray.
I’ve attached three pages as follows:

confirm-list.php
- This is the page that has the email server behaviour

Blank_3.php
- This is the email template page

consent-form.php
- This is the page that I want the link in the email to re-direct to. It has a recordset that I want the desired url variable to determine.

I have also attached two screenshots of the database tables that are being queried, as follows

1 - registered_apps
2 - consented_leaseholders

Attached Files
Blank_3.php
confirm-list.php
consent-form.php
Sign in to reply to this post

Ray BorduinWebAssist

Try adding this to the top of your Blank_3.php email body:

php:
<?php

global $rsConsConsent;
?>



Then you should be able to add a reference to the ID with:

php:
<?php echo($rsConsConsent->getColumnVal("IDColumn")); ?>
Sign in to reply to this post

s.joiner74419001

Thanks Ray.. This worked after I added 'echo' after the opening php tag as follows;

<?php echo $rsConsConsent->getColumnVal("entry_id"); ?>

I would like to be able to reference the same ID from the same recordset ( $rsConsConsent; ) in the pp_confirm.php page in line 146 that has the url that redirects to the checkout_success.php page. as follows:

$rtm_application->redirStr = "checkout_success.php?framed=1&fee=paid";

Not sure how to add the binding but removing the PHP tags as it is already inside a PHP function.

SO for example:

$rtm_application->redirStr = "checkout_success.php?framed=1&fee=paid&entryID="binding here"";

Thanks in advance

Sign in to reply to this post

Ray BorduinWebAssist

Your best bet is probably to save it in the $_SESSION and then you can add it to the url from there.

$rtm_application->redirStr = "checkout_success.php?framed=1&fee=paid&entryID=",($_SESSION["IDColumn"]) ."";

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...