Hi all,
I am one of those newbies who was hired to support the Webmaster, until she
moved on and now I'm designing databases & building user front ends with no
experience whatsoever. So I need some serious help!!
My system cuts two cookies. One called "canplay" to say that a person can
play without registering. And one called "canwin" to say they can win
because they've registered. Once the cookies expire, they need to either
reregister or choose not to register & get new "canplay/canwin" cookies. I
want to have them enter their email addresses and test the database to see if
a matching email has been entered. But I can't figure out how to do this.
Here is the code I've written so far. Please don't laugh at how basic it
is... This is an action page. They've come from a form page where they
entered their email address.
For those who have already registered, I need to carry the email forward so
that they get to a pre-populated form page. That's why I'm setting a cookie
here (expires at end of session). My next challenge will be to figure out
how to read that cookie & run a query to populate the form page with
previously entered information, but one problems at a time...
<!-- checks to see if user has already registered or not -->
<CFOUTPUT>
<CFSET user="#form.email#">
<CFCOOKIE NAME="email" VALUE="variable.user">
</CFOUTPUT>
<CFQUERY NAME="testregistered" DATASOURCE="marksport">
SELECT user_info_basic.uid,
user_info_basic.email
FROM user_info_basic
WHERE user_info_basic.email EQ variables.email
</CFQUERY>
<CFIF IsDefinied (testregistered.email)>
<CFLOCATION URL="/testsandbox/updateform.cfm">
<CFELSE>
<CFLOCATION URL="/testsandbox/shortform.cfm">
</CFIF>
Here's the error I'm getting:
Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'(null)'. Reason: Not associated with a trusted
SQL Server connection.
The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position
(14:1) to (14:54).
Date/Time: 07/27/00 11:59:53
Browser: Mozilla/4.7 [en] (Win98; I)
Remote Address: 209.190.195.200
HTTP Referer: http://www.marksport.com/testsandbox/registerform.cfm
ANY ideas would be greatly appreciate. I am soooooo confused!
:-)
Oriole
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.