PDA

View Full Version : Random Drawing Contest via e-mail


e-nation
18 Nov 2004, 04:41am
Hello. i'm hoping that maybe some of the genius in here might be able to help me with something that i want to create.

I am the administrator of an opt-in e-mail list. To gain more subscribers, we want to offer the incentive of a periodic random "drawing". in order to be eligible for the random drawing, one must be a subscriber of the list AND show some kind of proof that he or she has in fact read the e-mail.

the idea behind this contest is that we will

1. gain more subscibers
2. know the subscribers are reading the e-mail


my first thought is that when i send out an e-mail to the list, the subscribers could be directed to a URL where they could type in some type of code (which could be perhaps generated randomly-- and used to identify each unique user), or their "user ID", or even simply their e-mail address-- anything to be used as a unique identifier.
once they enter data into the form at that URL, the data would then be logged (via ColdFusion, ASP or PHP?) then at the time of the drawing, the data collected from that form would be computed to spit out a random winner. now that's just my first brainstorm on this.

does anyone have suggestions for how to set this up? i'd like to hear all of your suggestions. maybe there already exists a free PHP or CGI script that does this function? maybe i'm making this harder than it is? i appreciate your help, feedback, suggestions, comments.

thanks!

versello
18 Nov 2004, 06:15am
That would probably be the way I would do it, although that doesn't necessarily mean they absolutely read the email.

I suppose one way to make sure they read the email, is when they click on a link, take them to a small survey/quiz, and maybe ask a couple questions about the contents of the email.

As for logging the users, any of the scripting languages you mentioned will work, and only requires a few lines of code to do a simple log of the person's PID/email, and anything else you would want to log. Of the three, I have experience with PHP and ASP, although I prefer PHP over ASP.

If I have the time this weekend, I'll post a quick example of a PHP script that will log your users.

e-nation
18 Nov 2004, 06:40am
thanks for the reply! i wonder if there is an existing script out there somewhere?

i thought maybe this would ring a bell with someone who might have done something similar.

if you think of it as simply someone responding to an email, logging their click, recording the data... it really makes it seem more simple.

i think my main concern is to get the reader to click on something that will basically automatically record that they clicked on it-- not unlike the way an auto-generated email is sent to users when subscribing to a forum such as this one. i'm assuming that a database has logged the info, and when the person clicks that link, the database then says "okay, ____user has been validated"

so, that's my first step. then i need to figure out how to cruch that data after it's been collected. i'm hoping to get all of this to happen automatically.

e-nation
18 Nov 2004, 07:15pm
i thought this thing out a bit more... kind of made an outline. seems to make more sense now maybe...

i've broken my plan down into a three-step process:
1 - assign unique ID to listserv subscriber which will be used to identify that person in this "contest"
2 - record that ID data when the subscriber visits a URL
3 - crunch the data. to randomly select a contest "winner" from the recorded user IDs

the desired function for me as list administrator:
step 1 - send link to subscribers, leading them to a URL which will ultimately collect their unique ID data.

step 2 - find a way to automatically record the subscriber's ID data when they visit the link sent in their email-- and most importantly-- have that data be able to interact w/ the 3rd step.

step 3 - when ready, crunch the collected data. i want all of this to happen automatically.

to reiterate my main objective...
i'm a publicisit (very much in my "free time") for a live music venue. i'm trying to get people to sign up for an e-mail list while there at the venue, so hence the incentive of the "contest"-- prize will be free admission.

what i'm getting at here is that i don't want to have to have much "hands on" dealings with the data as it could end up being quite a lot of subscribers http://www.crowbarlivemusic.com

futhermore, i want to learn to set up database driven sites, so this is going to be a learning experience for me. in my grand visioin, i see all of this happening w/ dynamic pages and the whole nine. maybe i'm asking too much?

versello
20 Nov 2004, 02:23am
Nope, all of that is fairly simple, straightforward, and most of all, possible. A good book out there to get you started is "PHP and MySQL Web Development" by SAMS. I hope you have previous programming experience btw, or it may be a bumpy ride.

Let us know if we can help.

e-nation
20 Nov 2004, 07:53am
thanks, versello. i go from the principle that nothing is impossible... especially if it's been done before. i'll get it... just would be much easier, of course, if it had been written already!

;)

versello
20 Nov 2004, 05:48pm
I'm pretty sure something along the lines of that has been created before. You might want to try searching the site www.hotscripts.com. They have nearly everything imaginable.

e-nation
20 Nov 2004, 10:02pm
i actually already found one (http://www.hotscripts.com/Detailed/22446.html) on hotscripts.com, but i'd rather not pay $75 for it... but, last i looked a few days ago... i think it was pretty much exactly what i'm trying to do... i copied the text from the e-mail which was automatically generated and sent to me when i tried their demo page:

Re: phpRaffle v1.00


You, or someone else, submitted this email address to our Raffle.


Please click on the URL below to verify this email address and activate
raffle ticket# 177-105538 drawn on 2004-11-18 22:58:18


http://phpraffle.yourphppro.com/demo//verifyemail.php?Email=publicity@dantesinc.com&Verification=6612


Advertisement - Visit www.yourphppro.com for professional php applications.

phpRaffle v1.00

admittedly, i haven't done much programming yet at all... only just getting my feet wet w/ DreamWeaver & ColdFusion tutorials and what not (btw, thanks for suggesting the book reference... i do have these-- any here that you would recommend?
http://www.e-nationmusic.com/temp/phpbooks.jpg
... it just seems to me that this couldn't be that difficult to make happen...

e-nation
21 Nov 2004, 01:04am
i missed this during my last vist to yourphppro.com, the programmer that wrote the phpRaffle.

check it out (http://www.yourphppro.com/version/en-us/content/page_5_0_13.html)

it's a free version of the script-- this is what they say are the limitations:

phpRaffle Download
To get the following benefits, please purchase a license
* Does not require the Zend Optimizer.
* Application does not have an expiration
* Support and Installation Help.

phpRaffle Free 1.02
Requirements:

* PHP 4.3+
* mySQL 4.0.20+
* Zend Optimizer 2.1+

Expiration
* This version expires on Mar 1, 2005.


so... i'm wondering if i can take this and learn to write my own based off of it and enjoy a full working version w/ no expiration

versello (or any other readers here), i don't know how complicated it would be, but if you could examine the contents of the .zip file and let me know what i'm in for-- or perhaps even take a stab at it... i'd be really greatful! thank you, thank you, thank you!

versello
21 Nov 2004, 07:37pm
Well it looks like the main parts of the code have been compiled with Zen Optmizer, so I can't examine it.

Since you've already broken this down into three logical steps, I would just look for small and free scripts or guides that help you achieve each step.

step 1 - send link to subscribers, leading them to a URL which will ultimately collect their unique ID data.

I know small email scripts exist (I would rather work from a guide/book that just shows you a clear-cut answer, since user-created scripts tend to be bloated and hard to work with) that can send emails with any content you want.

This is pretty much a one-line code, unless you're sending to multiple people. Then it'd be two lines.

step 2 - find a way to automatically record the subscriber's ID data when they visit the link sent in their email-- and most importantly-- have that data be able to interact w/ the 3rd step.

I would suggest finding an intro tutorial on PHP and MySQL. I started out by doing google searches and found some extremely helpful guides on the net.

All you need here is a MySQL (or some other) database set up, then in your script, it essentially conists of connecting to the database, taking the unique ID from the link the user clicked on, inserting it, then lastly closing the database connection. PHP makes this extremely easy and just requires a few lines.

step 3 - when ready, crunch the collected data. i want all of this to happen automatically.

This is also a few lines of code; Connect to the database, have a query pick out a random record, display the winner to you and close the database connection.



I haven't heard of any of those books you mentioned, although you might just want to focus on the John Wiley PHP & MySQL book.

Hope this helps!

e-nation
22 Nov 2004, 05:24am
thanks, versello, for showing me how i might cut off pieces small enough to chew!

i look forward to giving it a try!

i believe that PHP will be my best bet, but i'm curious... do you have any experience w/ ColdFusion? if so, since i'm already trying to learn it, do you think i should proceed and attempt this w/ CF MX 6.1, or put that on hold and pick up the PHP books?

i'm asking because, being of the A.D.D. type, i'm also simultaneously working on a project to set up a dynamic inventory for a music store where i teach www.alleycatmusic.net , and i've already started it in CF.

versello
23 Nov 2004, 05:38pm
I have not worked with ColdFusion, so I can't comment on its ease of use, but if you've already started learning with it, it may be easier to just stick with it. But maybe the syntax is the same as PHP...