Need some direction please
Here's my dilema. Our website runs a quarterly prize giveaway. Currently we have an ASP form that gathers the inputed info into a database and then sends us an e-mail confirmation of the entry. Our rules specifically state that only one entry is allowed per quarter. As I am not a programmer (just a dabbler in programming) I have no idea on how to do the following and need some help. What we need is a script that will check our current database against an e-mail, last name, and first name entry. If that entry is in our database a message pops up telling them that they have already registered with us. If there entry is not located in our database then the new info passes along unhindered. We are on a Cobalt RaQ4r with ChiliAsp 3.62 installed and are using MySQL. Thanks in advance for the help. Sincerely, Stephen M. LaBar, Jr. (770) 381-3826 Computer Specialist Please Visit Our Site At: http://www.csi-atl.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Need some direction please
Here's my dilema. Our website runs a quarterly prize giveaway. Currently we have an ASP form that gathers the inputed info into a database and then sends us an e-mail confirmation of the entry. Our rules specifically state that only one entry is allowed per quarter. As I am not a programmer (just a dabbler in programming) I have no idea on how to do the following and need some help. What we need is a script that will check our current database against an e-mail, last name, and first name entry. If that entry is in our database a message pops up telling them that they have already registered with us. If there entry is not located in our database then the new info passes along unhindered. We are on a Cobalt RaQ4r with ChiliAsp 3.62 installed and are using MySQL. Thanks in advance for the help. Sincerely, Stephen M. LaBar, Jr. (770) 381-3826 Computer Specialist Please Visit Our Site At: http://www.csi-atl.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Need some direction please
Hi. This is almost off-topic for this list, as it is more of a programming problem that a database problem. Aside from that, you know that you cannot really prevent multiple registrations as it is easy to get a different mail address? For the same reason, you probably do not want to tell them that they have already registered at once, but silently filter out duplicates before you use them for choosing the winner. This way, you have a greater chance that they will use the same data for multiple registrations and therefore you have a better chance to really catch those. Or alternatively (as you seem to forward the internal e-mail at once), simply drop the second registration silently, showing the user the same page as he would get on the first registration. As you already have a script that makes the INSERT into the database, you only have to make a SELECT first, to see if there is a record with the data you consider unique. Something like SELECT id FROM your_table WHERE first_name='$first' AND last_name='$last' AND email='$email' Well, I hope that get you going. If you need more help, please be specific in where you are stuck. Don't expect us to write your programs. If you have no clue where even to start with, I recommend you considering to hire someone in the know. Regards, Benjamin. On Mon, May 20, 2002 at 02:23:59PM -0400, [EMAIL PROTECTED] wrote: Here's my dilema. Our website runs a quarterly prize giveaway. Currently we have an ASP form that gathers the inputed info into a database and then sends us an e-mail confirmation of the entry. Our rules specifically state that only one entry is allowed per quarter. As I am not a programmer (just a dabbler in programming) I have no idea on how to do the following and need some help. What we need is a script that will check our current database against an e-mail, last name, and first name entry. If that entry is in our database a message pops up telling them that they have already registered with us. If there entry is not located in our database then the new info passes along unhindered. We are on a Cobalt RaQ4r with ChiliAsp 3.62 installed and are using MySQL. Thanks in advance for the help. Sincerely, Stephen M. LaBar, Jr. (770) 381-3826 Computer Specialist Please Visit Our Site At: http://www.csi-atl.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Need some direction please
Webmaster wrote: Here's my dilema. Our website runs a quarterly prize giveaway. Currently we have an ASP form that gathers the inputed info into a database and then sends us an e-mail confirmation of the entry. Our rules specifically state that only one entry is allowed per quarter. As I am not a programmer (just a dabbler in programming) I have no idea on how to do the following and need some help. What we need is a script that will check our current database against an e-mail, last name, and first name entry. If that entry is in our database a message pops up telling them that they have already registered with us. If there entry is not located in our database then the new info passes along unhindered. We are on a Cobalt RaQ4r with ChiliAsp 3.62 installed and are using MySQL. Thanks in advance for the help. Sincerely, Stephen M. LaBar, Jr. (770) 381-3826 Computer Specialist Please Visit Our Site At: http://www.csi-atl.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php add primary_key (e-mail, last name, first name) when checking the result from the db, parse the error message looking for the error string mysql generates when a primary_key is violated - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php