Click to See Complete Forum and Search --> : Forms/Database question


Ashcrapper
10-20-2004, 05:39 AM
Hi,

Wasnt sure what to call this or where to put it so here goes:

My boss wants to run the following promotion:

From our existing database of subscribers, send out an email offering a chance to get entered into a prize draw by recommending a friend who must then subscribe. Then basically if that person subscribes they get entered into the prize draw.

The 'recomended' people wont be entered into the draw, just the original users. So for example, if one user recommends 10 people and they all subscribe they get 10 entries into the prize draw.

Ive no problem with doing the mailing list, but to be honest Im at a bit of a loss on the best way of doing the rest. I would be using ASP using dreamweaver.

If anyone can give me some advice that would be fantastic.

Thanks in advance,
Ash

PeOfEo
10-20-2004, 02:05 PM
Just populate a recordset based on the 'original member' or whatever feild, then use a loop to send the email code. You have the email code in the loop and the loop is looping through the rows of the record set. That is how I would do it... in a nut shell.

Ashcrapper
10-20-2004, 02:10 PM
dont understand what you mean mate, which bit is that going to solve?

PeOfEo
10-20-2004, 02:15 PM
Well do you know what a record set is? You just use an sql statement to populate it. It works in a similar manner to an array in that you can loop through it and it has a row number which is kind of like an array index. Then you just grab the email out of the recordset within the loop and fire the email code.

Ashcrapper
10-20-2004, 02:27 PM
:)

yeah I understand what a recordset is. The problem isnt doing the mailing bit, what Im a bit stuck on is the best way to do the next bit, should I just get the friend to manually add in their friends ID number when they fill in the form theirselves and just store that in a database to draw a winner from?

Im not a great programmer and suspect there must be a better way to do this rather than relying on the user

NogDog
10-20-2004, 02:36 PM
One solution might be to create a form where the current member recommends someone, including that person's email. Then the email that is generated by this form goes to the friend, including a link to click to register. That link would include the recommender's id#, something like:
http://www.yourcompany.com/promotion.asp?referer=12345
I'm not familiar with asp, but presumably it can pick up the "referer" value sent via the above "get" method, then use that to add 1 to the count of referals made by that person.

PeOfEo
10-20-2004, 11:01 PM
Originally posted by Ashcrapper
:)

yeah I understand what a recordset is. The problem isnt doing the mailing bit, what Im a bit stuck on is the best way to do the next bit, should I just get the friend to manually add in their friends ID number when they fill in the form theirselves and just store that in a database to draw a winner from?

Im not a great programmer and suspect there must be a better way to do this rather than relying on the user I would say have maybe a link (sort of link an online rpg koc outwar type of deal). When a friend refers another friend they click a link with a query string that identifies the referer. Its similar to Nog's idea, except it would not neccessarily be an email form. You can just give the original person a link right after he registers and it can be on his personal main page thing on your site and this way he can spread it through aim, etc.

Ashcrapper
10-21-2004, 09:31 AM
that sounds fair enough, Ill give that a go. Thanks mate :)