close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Passing database primary key in email

Thread began 5/16/2010 4:22 am by johnffrench314542 | Last modified 5/17/2010 12:17 pm by Eric Mittman | 826 views | 1 replies |

johnffrench314542

Passing database primary key in email

At the moment I have a UE page that sends a newsletter using details contained in a mySQL database. I want to add an unsubscribe link to the bottom of the email. Do you know how, when sending the email, I can pass the primary key parameter to the unsubscribe link so that a DW delete server behaviour can be used on the landing page?

Sign in to reply to this post

Eric Mittman

You will want to first craft your delete page that will delete or update that record in the db. You will want to setup the server behavior so that it is triggered on a get parameter, whatever you would like to call it.

Since the get parameter will be set to the id of the record you will use this as the key value in the update or delete server behavior.

Are you planning on updating the user's record to set an email columns value? If so then in your email you will add a regular link to the bottom of the message. Make sure to add in your get URL parameter here, I will refer to it as UserID. You then add in the recordset binding for the users id so the link might look like this:

php:
<a href="http://yoursite.com/unsubscribe.php?UserID=<?php echo $row_Users['UserID'?>">unsubscribe</a>



When the user clicks on this link it should take them to this page with the update or delete on it, the page will use the id passed in the UserID get parameter as record key. Then just update the column or delete the record as needed.

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