A form gets filled out with just an email address. When the submit button is
clicked the action page for putting the address in the DB is brought up.
This page is supposed to check to see if the same email address is already
in the system, and if it is to throw an error to the user. But unfortunately
for some reason this isn't happening.
What I get now is either all emails are blocked or no emails are blocked. I
have included the code below. This particular version of code registers
anyone to the newsletter whether or not they are already signed up.
Any help is appreciated!
<cfquery name="check_email" datasource="#mydbname#">
SELECT newsletter_id, email_address
FROM newsletter
</cfquery>
<cfif 'email_address' EQ <!--- I have tried IS also --->
#form.email_address#>
Your email address is already in our system.
<cfelse>
<cfquery datasource="#mydbname#" name="newsletter">
INSERT INTO newsletter (email_address)
VALUES('#form.email_address#')
</cfquery>
You are now registered to The Newsletter.
</cfif>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]