close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Passing Dynamic Variables

Thread began 1/04/2011 5:04 pm by Me | Last modified 1/12/2011 8:39 am by Ray Borduin | 2532 views | 20 replies |

Me

Passing Dynamic Variables

I have stored, in a MySQL table, various emails in an html format, the content column being called htmlcontent which is a column text type. I am therefore able to store many different html emails and using dynamic process able to create an email campaign where I can choose the recipients from one recordset and the html email content from another recordset an bam, the email gets sent of to all the recipients no problem.

However, I have discovered that I am unable to do one thing that would really help me, particularly in terms of tracking who opened the email. Lets say in the html email I have a stored in MySQL, I have a link which is laid out something like this when it is pulled in to the page for sending;

<p>some text here</p>

<a href="http://www.mywebdomains.co.uk/emails/january-1.php?readerID=1">Click Here to read this Online</a>

<p>some text here</p>

Note the readerID in the URL link. Is there a way to get UE to echo that id properly as currently, even though I have reference the correct recordset, when the email arrives it shows the link like this;

<a href="http://www.mywebdomains.co.uk/emails/january-1.php?<?php echo readerID=1" ?> >Click Here to read this Online</a>

As you can see it renders the whole echo function not the ID i required. Now, I understand that if I lay html out in the UE dialogue I can include dynamic elements from records sets that are available on the page but, that means I have to created a separate waue_filename_1.php for each email template I created.

I am probably overlooking something here real basic...can enyonw shine a light on a solution for me?

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of your page and the webassist/email folder so i can examine the code.

Sign in to reply to this post

Me

Passing Dynamic Value

Originally Said By: Jason Byrnes
  can you send a copy of your page and the webassist/email folder so i can examine the code.  



OR...is there way I can't think to to include some sort of tracking mechanism like on the emails you guys send out OR contact Contact?

Sign in to reply to this post

Me

Originally Said By: drew.paget161534
  OR...is there way I can't think to to include some sort of tracking mechanism like on the emails you guys send out OR contact Contact?  



In fact...how do you do yours...those promotional emails I get fomr webassist...thats what Im trying to do?!

You have querys on the image or viewonline link

:-)

Sign in to reply to this post

Ray BorduinWebAssist

What syntax are you using to add the link currently?

You should be able to echo values, so there must be an issue with how you are adding it. Where do you want the value to come from? Is the readerid in the recordset you are using to send the emails and get the TO address?

Sign in to reply to this post

Me

ID

Originally Said By: Ray Borduin
  What syntax are you using to add the link currently?

You should be able to echo values, so there must be an issue with how you are adding it. Where do you want the value to come from? Is the readerid in the recordset you are using to send the emails and get the TO address?  



Yes - the readerid is in a recordset being used in the page (sending the mail) as is the TO address

The content of the html email is stored in a mysql table, in a text column, so for example it the content of the text column might look like this...

<p>some content here</p>

Hello <php echo therecordset['Firstname']; ?>

<p>some more content here</p>

This column is then referenced to in the page (the page sending the mail) as the content.

So when I open the dialogue box and choose the content I choose the recordset column as defined.

Sign in to reply to this post

Ray BorduinWebAssist

Read the top sticky thread in the universal email group:

showthread.php?t=17869

it talks about adding details from the recordset to the body.

Sign in to reply to this post

Me

Example Data from Mysql

To make this a little clearer. The page template / content is stored in mysql and is fetched by a recordset in the page sending the email. In UE it is inserted ino the Email Message Body Editor using the dynamic lightening bolt and the value in the Email Message Body Editor looks like this...

<?php echo $row_rsContent['htmlcontent']?>

Which then pulls data from the recordset/mysql table/column which looks like this below. And, for example I wish to be able to place the readerid on the "Click Here if you are unable to view this email properly" link.

<head>
<title>January Campaign One</title>
</head>
<body bottommargin="0" topmargin="5px" leftmargin="0" rightmargin="0" bgcolor="#000000">
<table border="0" align="center" cellpadding="0" cellspacing="0" width="100%" bgcolor="#000000">
<tr>
<td bgcolor="#000024"><table width="600" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="600" align="center" style="padding-top:5px; padding-bottom:10px; font-family:Verdana, Geneva, sans-serif; font-size:12px;"><a href="#?readerid=<?php echo $row_rsRecipients['readerid']); ?>" style="color:#FFF">Click Here if you are unable to view this email properly</a></td>
</tr>
</table>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td align="center" bgcolor="#FF0000" style="padding:15px 0px 15px 0px;font-family:Verdana,Arial;font-size:12px;font-weight:bold;color:#FFFFFF">SAVINGS ON LOTS OF PRODUCTS THROUGHOUT JANUARY 2011 VISIT WEBSITE</td>
</tr>
<tr>
<td align="left" bgcolor="#FFFFFF" style="padding:5px 0px 10px 0px;font-family:Verdana,Arial;font-size:11px;line-height:16px;font-weight:regular;color:#231f20; text-align:center">My Business Address</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

Does this make it a little clearer...any help appreciated!

PS in the a link there is a #. This is for this post...the real email contains an absolute URL instead.
PSS As you can also see there are two recordsets on the page rsContent that gets the content for the page and rsRecipients which gets the id and email for each recipients. These two recordsets are available on the page sending the email.

Sign in to reply to this post

Ray BorduinWebAssist

I think you just use:

<?php echo($RecipArray[$RecipIndex][0]["htmlcontent"]); ?>

instead of:

<?php echo $row_rsContent['htmlcontent']?>

Sign in to reply to this post

Me

ID

Originally Said By: Ray Borduin
  I think you just use:

<?php echo($RecipArray[$RecipIndex][0]["htmlcontent"]); ?>

instead of:

<?php echo $row_rsContent['htmlcontent']?>  



Hi..I have uploaded some files so you can take a look at what is happening. Start with Read_Me_First.php

Attached Files
files.zip
Sign in to reply to this post
loading

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